From 2aa91e565486a5fe6bc9f06b0443af290c2885f8 Mon Sep 17 00:00:00 2001 From: Anton Shtarev Date: Tue, 30 Dec 2025 10:21:48 +0200 Subject: [PATCH 1/2] fix: Support arro3 table schema with newer deltalake packages Signed-off-by: Anton Shtarev --- sdk/python/feast/infra/offline_stores/file_source.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 12524ab4fc2..6704808400e 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -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}") From 80f8aff6bc1bac4ba4b5671d389d026ac8889656 Mon Sep 17 00:00:00 2001 From: Anton Shtarev Date: Tue, 30 Dec 2025 14:20:55 +0200 Subject: [PATCH 2/2] Fix lint Signed-off-by: Anton Shtarev --- sdk/python/feast/infra/offline_stores/file_source.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 6704808400e..02d40ad770b 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -202,10 +202,9 @@ def get_table_column_names_and_types( "AWS_ENDPOINT_URL": str(self.s3_endpoint_override), } - delta_schema = ( - DeltaTable(self.path, storage_options=storage_options) - .schema() - ) + delta_schema = DeltaTable( + self.path, storage_options=storage_options + ).schema() if hasattr(delta_schema, "to_arrow"): # deltalake >= 0.10.0 arro3_schema = delta_schema.to_arrow() @@ -214,7 +213,7 @@ def get_table_column_names_and_types( # deltalake < 0.10.0 schema = delta_schema.to_pyarrow() else: - raise Exception(f"Unknown DeltaTable package version") + raise Exception("Unknown DeltaTable package version") else: raise Exception(f"Unknown FileFormat -> {self.file_format}")