diff --git a/sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark_source.py b/sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark_source.py index 5b9f562181..a27065fb5e 100644 --- a/sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark_source.py +++ b/sdk/python/feast/infra/offline_stores/contrib/spark_offline_store/spark_source.py @@ -159,10 +159,7 @@ def get_table_column_names_and_types( store_config=config.offline_store ) df = spark_session.sql(f"SELECT * FROM {self.get_table_query_string()}") - return ( - (fields["name"], fields["type"]) - for fields in df.schema.jsonValue()["fields"] - ) + return ((field.name, field.dataType.simpleString()) for field in df.schema) def get_table_query_string(self) -> str: """Returns a string that can directly be used to reference this table in SQL"""