From a9060188713e34d07fd82cf3469061fdd2220956 Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 16 Sep 2022 17:58:43 +0100 Subject: [PATCH] fix: Remove opening file object when validating S3 parquet source (#3217) * Remove opening the file object Let pyarrow handle opening the path using the filesystem. Signed-off-by: Max Z * fix: linting error Signed-off-by: Max Z Signed-off-by: Max Z --- sdk/python/feast/infra/offline_stores/file_source.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/file_source.py b/sdk/python/feast/infra/offline_stores/file_source.py index 135409ed04..81a83c2245 100644 --- a/sdk/python/feast/infra/offline_stores/file_source.py +++ b/sdk/python/feast/infra/offline_stores/file_source.py @@ -160,9 +160,7 @@ def get_table_column_names_and_types( if filesystem is None: schema = ParquetDataset(path).schema.to_arrow_schema() else: - schema = ParquetDataset( - filesystem.open_input_file(path), filesystem=filesystem - ).schema + schema = ParquetDataset(path, filesystem=filesystem).schema return zip(schema.names, map(str, schema.types))