Skip to content

Commit d5f1da1

Browse files
committed
Fixing custom S3 endpoint read fail
Signed-off-by: llFireHawkll <sparsh.dtt@gmail.com>
1 parent 452dcd3 commit d5f1da1

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,15 @@ def get_table_column_names_and_types(
179179
filesystem, path = FileSource.create_filesystem_and_path(
180180
self.path, self.file_options.s3_endpoint_override
181181
)
182-
schema = ParquetDataset(
183-
path if filesystem is None else filesystem.open_input_file(path)
184-
).schema.to_arrow_schema()
182+
# Adding support for different file format path
183+
# based on S3 filesystem
184+
if filesystem is None:
185+
schema = ParquetDataset(path).schema.to_arrow_schema()
186+
else:
187+
schema = ParquetDataset(
188+
filesystem.open_input_file(path), filesystem=filesystem
189+
).schema
190+
185191
return zip(schema.names, map(str, schema.types))
186192

187193
@staticmethod

0 commit comments

Comments
 (0)