Pewarta Proxy

📋 Server Request & Proxy Logs

Loading active proxy settings...
Developed by Khairul Adha (adhexa.id)
Mengambil log server...

⚙️ Pengaturan Proxy Target

Skip to content

Commit 18cdded

Browse files
committed
fix: Support arro3 table schema with newer deltalake packages
Signed-off-by: Anton Shtarev <a.o.shtarev@gmail.com>
1 parent 59dbb33 commit 18cdded

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎sdk/python/feast/infra/offline_stores/file_source.py‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,19 @@ def get_table_column_names_and_types(
202202
"AWS_ENDPOINT_URL": str(self.s3_endpoint_override),
203203
}
204204

205-
schema = (
205+
delta_schema = (
206206
DeltaTable(self.path, storage_options=storage_options)
207207
.schema()
208-
.to_pyarrow()
209208
)
209+
if hasattr(delta_schema, "to_arrow"):
210+
# deltalake >= 0.10.0
211+
arro3_schema = delta_schema.to_arrow()
212+
schema = pyarrow.schema(arro3_schema)
213+
elif hasattr(delta_schema, "to_pyarrow"):
214+
# deltalake < 0.10.0
215+
schema = delta_schema.to_pyarrow()
216+
else:
217+
raise Exception(f"Unknown DeltaTable package version")
210218
else:
211219
raise Exception(f"Unknown FileFormat -> {self.file_format}")
212220

0 commit comments

Comments
 (0)