You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python] Bindings for Variant canonical extension type #50131
The arrow.parquet.variant canonical extension type was introduced to C++ in GH-46104 (PR #45375) to represent semi-structured data using a two-buffer (metadata and value) struct layout.
This issue tracks exposing the C++ VariantExtensionType class, along with its custom VariantArray and VariantScalar representations, to PyArrow.
Exposing this type to Python will allow downstream projects to programmatically handle Variant schemas and data.
Implement VariantArray inheriting from ExtensionArray.
Implement VariantScalar inheriting from ExtensionScalar.
Provide access to underlying elements (or dictionary representations) via as_py() / to_pydict().
Testing:
Add comprehensive tests in python/pyarrow/tests/test_extension_type.py validating registration, round-trip IPC, pickle compatibility, array building, and scalar inspection.
Dependencies:
Exposing core type metadata and storage wrapping does not require execution engines, but constructing arrays from Python objects and resolving/decoding values requires the C++ binary encoding/decoding implementations.
Activity
qzyu999 commentedon Jun 9, 2026
take