You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(bigquery): Support DATE-type event timestamp columns (#6362)
* feat(bigquery): Support DATE-type event timestamp columns
When the event_timestamp column in BigQuery is a DATE type, the
generated SQL wraps comparison values in TIMESTAMP(), causing a type
mismatch error. This adds a timestamp_field_type parameter to
BigQuerySource that, when set to "DATE", generates DATE() comparisons
instead.
Closes#2530 (part 2)
Signed-off-by: Jonathan Wrede <wrede.jonathan00@gmail.com>
* fix(bigquery): Use protobuf 4.25.x compatible generated code
The proto files were regenerated with protobuf 6.31.1 / grpcio-tools
1.80.0, which imports runtime_version -- a module that does not exist
in protobuf 4.25.x used by the project. Revert generated code to
4.25.1 format while keeping the new timestamp_field_type field.
Signed-off-by: Jonathan Wrede <wrede.jonathan00@gmail.com>
* fix(bigquery): Add Literal type annotation for cast_style
Mypy infers str from the ternary expression; annotate with the
exact Literal union so the call to get_timestamp_filter_sql passes
type checking.
Signed-off-by: Jonathan Wrede <wrede.jonathan00@gmail.com>
* fix: Make timestamp_field_type default to None in FeatureViewQueryContext
Callers that do not use DATE-typed timestamp fields (e.g. Spark offline
store tests) should not be forced to pass timestamp_field_type. Adding
a default keeps the new field backward-compatible.
Signed-off-by: Jonathan Wrede <wrede.jonathan00@gmail.com>
* 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>
* fix: regenerate protos matching upstream mypy-protobuf style
Reset all non-DataSource generated files to match master.
Only DataSource_pb2.py and DataSource_pb2.pyi contain our
timestamp_field_type additions (field 28). The .pyi stub
is hand-edited to match the existing import style used on
master.
Signed-off-by: Jonathan Wrede <wrede.jonathan00@gmail.com>
---------
Signed-off-by: Jonathan Wrede <wrede.jonathan00@gmail.com>
0 commit comments