Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Register super extension on to_arrow #3030

Merged
merged 3 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion daft/logical/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from daft.daft import read_csv_schema as _read_csv_schema
from daft.daft import read_json_schema as _read_json_schema
from daft.daft import read_parquet_schema as _read_parquet_schema
from daft.datatype import DataType, TimeUnit
from daft.datatype import DataType, TimeUnit, _ensure_registered_super_ext_type

if TYPE_CHECKING:
import pyarrow as pa
Expand Down Expand Up @@ -82,6 +82,7 @@ def to_pyarrow_schema(self) -> pa.Schema:
Returns:
pa.Schema: PyArrow schema that corresponds to the provided Daft schema
"""
_ensure_registered_super_ext_type()
return self._schema.to_pyarrow_schema()

@classmethod
Expand Down
2 changes: 2 additions & 0 deletions daft/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ def to_arrow(self) -> pa.Array:
"""
Convert this Series to an pyarrow array.
"""
_ensure_registered_super_ext_type()

dtype = self.datatype()
arrow_arr = self._series.to_arrow()

Expand Down
Loading