Skip to content
Merged
Changes from 1 commit
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
Next Next commit
fix: Support arro3 table schema with newer deltalake packages
Signed-off-by: Anton Shtarev <a.o.shtarev@gmail.com>
  • Loading branch information
trollknurr authored and ntkathole committed Dec 31, 2025
commit 2aa91e565486a5fe6bc9f06b0443af290c2885f8
12 changes: 10 additions & 2 deletions sdk/python/feast/infra/offline_stores/file_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,19 @@ def get_table_column_names_and_types(
"AWS_ENDPOINT_URL": str(self.s3_endpoint_override),
}

schema = (
delta_schema = (
DeltaTable(self.path, storage_options=storage_options)
.schema()
.to_pyarrow()
)
if hasattr(delta_schema, "to_arrow"):
# deltalake >= 0.10.0
arro3_schema = delta_schema.to_arrow()
schema = pyarrow.schema(arro3_schema)
elif hasattr(delta_schema, "to_pyarrow"):
# deltalake < 0.10.0
schema = delta_schema.to_pyarrow()
else:
raise Exception(f"Unknown DeltaTable package version")
else:
raise Exception(f"Unknown FileFormat -> {self.file_format}")

Expand Down