Skip to content

Commit aed2012

Browse files
committed
fix: Keep timestamp_field_type required in FeatureViewQueryContext
A default value on timestamp_field_type breaks the SparkFeatureViewQueryContext subclass because its non-default fields (min_date_partition, max_date_partition) would follow a field with a default. Instead, keep it required and update the Spark test to pass it. Signed-off-by: Jonathan Wrede <wrede.jonathan00@gmail.com>
1 parent eb61ce7 commit aed2012

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class FeatureViewQueryContext:
9898
date_partition_column: Optional[
9999
str
100100
] # this attribute is added because partition pruning affects Athena's query performance.
101-
timestamp_field_type: Optional[str] = None
101+
timestamp_field_type: Optional[str]
102102

103103

104104
def get_feature_view_query_context(

sdk/python/tests/unit/infra/offline_stores/contrib/spark_offline_store/test_spark_bfv_compute_on_read.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def base_query_context():
5252
min_event_timestamp="2023-01-01T00:00:00",
5353
max_event_timestamp="2024-01-01T00:00:00",
5454
date_partition_column=None,
55+
timestamp_field_type=None,
5556
)
5657

5758

0 commit comments

Comments
 (0)