From bd7c312a287fbf3bde8e411dcdf2177df6d72fb0 Mon Sep 17 00:00:00 2001 From: Maks Stachowiak Date: Tue, 16 Jan 2024 14:29:35 +0100 Subject: [PATCH] init --- .../time_dependent_spark_source.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/time_dependent_spark_source.py b/sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/time_dependent_spark_source.py index 8af17e4545..c587c33570 100644 --- a/sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/time_dependent_spark_source.py +++ b/sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/time_dependent_spark_source.py @@ -157,11 +157,11 @@ def get_table_query_string(self, **kwargs) -> str: raise AssertionError("Could not find an active spark session.") try: df = spark_session.read.format(self.file_format).load(*paths) - except Exception: - logger.exception( - "Spark read of file source failed.\n" + traceback.format_exc() - ) - tmp_table_name = get_temp_entity_table_name() - df.createOrReplaceTempView(tmp_table_name) - - return f"`{tmp_table_name}`" + tmp_table_name = get_temp_entity_table_name() + df.createOrReplaceTempView(tmp_table_name) + + return f"`{tmp_table_name}`" + except Exception as e: + msg = "Spark read of file source failed.\n" + traceback.format_exc() + logger.exception(msg) + raise Exception(msg) from e