Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
85a18dc
feat: Add enabled/disabled toggle for feature views
rpathade May 13, 2026
5e98c7f
feat: Add demo noteboooks for users
ntkathole May 8, 2026
f735cd2
feat: Add CLI enable/disable commands and registry metadata support
rpathade May 15, 2026
426ae09
Added features
rpathade May 16, 2026
365ecb4
fix(compute-engine/local): Honor field_mapping on join keys in dedup …
1fanwang May 13, 2026
5b94d4d
feat: Add Prometheus gauges for FeatureStore installation telemetry (…
ntkathole May 13, 2026
b5297b8
docs: Rename Atlas Vector Search to MongoDB Vector Search and fix cod…
jvincent-mongodb May 13, 2026
04d500c
feat(dynamodb): Use ProjectionExpression when requested_features is set
Jwrede May 3, 2026
c9e368b
fix(dynamodb): Fix mypy type for _build_projection_expression return
Jwrede May 3, 2026
de050ab
fix(bigquery): Enable list inference for parquet loads in offline_wri…
Jwrede May 3, 2026
78fcd72
fix(trino): Clean up temporary entity tables after retrieval (#6381)
Jwrede May 14, 2026
2014acd
feat(bigquery): Support DATE-type event timestamp columns (#6362)
Jwrede May 14, 2026
5e69e5f
fix: Fixes for ray source
ntkathole May 14, 2026
53e4a92
feat: Expose registry endpoints on feature server for MCP access
patelchaitany Apr 21, 2026
e9791b0
fix: Revert state propagation to always update in _update_metadata_fi…
rpathade May 16, 2026
f7fd0f8
fix: Recompile protos for protobuf 4.x compatibility and fix state ma…
rpathade May 18, 2026
a4f7ab8
feat: Add unit tests for state machine and clean up lazy imports in r…
rpathade May 18, 2026
3aa8778
fix: Address review comments for feature view state management
rpathade May 20, 2026
e626433
fix: Resolve integration test failures in apply loop
rpathade May 20, 2026
8130b63
fix: Resolve integration test failures in apply loop
rpathade May 20, 2026
2b54bd0
Apply suggestion from @ntkathole
rpathade May 21, 2026
cb33b6d
fix: Resolve review comments for feature_store
rpathade May 21, 2026
f3b94eb
fix: Resolve review comments for feature_views.py
rpathade May 21, 2026
a4c85dc
Merge branch 'master' into feat/feature-view-enabled-disabled-v2
rpathade May 21, 2026
abb6a41
Merge remote-tracking branch 'origin/master' into feat/feature-view-e…
rpathade May 21, 2026
f4dd0a4
feat: Add FeatureStore methods and update describe for enabled/state
rpathade May 22, 2026
a3f65b0
Merge branch 'master' into feat/feature-view-enabled-disabled-v2
rpathade May 22, 2026
efd41a6
fix: Add type: ignore comments for mypy on BaseFeatureView attr access
rpathade May 22, 2026
436a712
fix: Remove REST API endpoints for enable/disable/set-state (deferred…
rpathade May 22, 2026
7110346
Merge remote-tracking branch 'origin/master' into feat/feature-view-e…
rpathade May 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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>
Signed-off-by: RutujaPathade <73137503+RutujaPathade@users.noreply.github.com>
  • Loading branch information
Jwrede authored and rpathade committed May 21, 2026
commit 2014acd8b7905e0c66b439ad4476e676c1cd966d
6 changes: 5 additions & 1 deletion protos/feast/core/DataSource.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import "feast/types/Value.proto";
import "feast/core/Feature.proto";

// Defines a Data Source that can be used source Feature data
// Next available id: 28
// Next available id: 29
message DataSource {
// Field indexes should *not* be reused. Not sure if fields 6-10 were used previously or not,
// but they are going to be reserved for backwards compatibility.
Expand Down Expand Up @@ -81,6 +81,10 @@ message DataSource {
// Must specify creation timestamp column name
string created_timestamp_column = 5;

// (Optional) Type of the timestamp_field column ("TIMESTAMP" or "DATE").
// When set to "DATE", SQL generation uses date-only comparisons.
string timestamp_field_type = 28;

// This is an internal field that is represents the python class for the data source object a proto object represents.
// This should be set by feast, and not by users.
// The field is used primarily by custom data sources and is mandatory for them to set. Feast may set it for
Expand Down
7 changes: 7 additions & 0 deletions sdk/python/feast/data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ class DataSource(ABC):
tags: Dict[str, str]
owner: str
date_partition_column: str
timestamp_field_type: str
created_timestamp: Optional[datetime]
last_updated_timestamp: Optional[datetime]

Expand All @@ -219,6 +220,7 @@ def __init__(
tags: Optional[Dict[str, str]] = None,
owner: Optional[str] = "",
date_partition_column: Optional[str] = None,
timestamp_field_type: Optional[str] = None,
):
"""
Creates a DataSource object.
Expand All @@ -237,6 +239,9 @@ def __init__(
owner (optional): The owner of the data source, typically the email of the primary
maintainer.
date_partition_column (optional): Timestamp column used for partitioning. Not supported by all stores
timestamp_field_type (optional): Type of the timestamp_field column.
Defaults to "TIMESTAMP". Set to "DATE" when the event timestamp column
is a DATE type, so SQL generation uses date-only comparisons.
"""
self.name = name
self.timestamp_field = timestamp_field or ""
Expand All @@ -257,6 +262,7 @@ def __init__(
self.date_partition_column = (
date_partition_column if date_partition_column else ""
)
self.timestamp_field_type = timestamp_field_type if timestamp_field_type else ""
now = _utc_now()
self.created_timestamp = now
self.last_updated_timestamp = now
Expand All @@ -280,6 +286,7 @@ def __eq__(self, other):
or self.created_timestamp_column != other.created_timestamp_column
or self.field_mapping != other.field_mapping
or self.date_partition_column != other.date_partition_column
or self.timestamp_field_type != other.timestamp_field_type
or self.description != other.description
or self.tags != other.tags
or self.owner != other.owner
Expand Down
21 changes: 19 additions & 2 deletions sdk/python/feast/infra/offline_stores/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,18 @@ def pull_latest_from_table_or_query(
project=project_id,
location=config.offline_store.location,
)
cast_style: Literal["date_func", "timestamp_func"] = (
"date_func"
if data_source.timestamp_field_type == "DATE"
else "timestamp_func"
)
timestamp_filter = get_timestamp_filter_sql(
start_date,
end_date,
timestamp_field,
date_partition_column=data_source.date_partition_column,
quote_fields=False,
cast_style="timestamp_func",
cast_style=cast_style,
)
query = f"""
SELECT
Expand Down Expand Up @@ -220,13 +225,18 @@ def pull_all_from_table_or_query(
+ BigQueryOfflineStore._escape_query_columns(feature_name_columns)
+ timestamp_fields
)
cast_style: Literal["date_func", "timestamp_func"] = (
"date_func"
if data_source.timestamp_field_type == "DATE"
else "timestamp_func"
)
timestamp_filter = get_timestamp_filter_sql(
start_date,
end_date,
timestamp_field,
date_partition_column=data_source.date_partition_column,
quote_fields=False,
cast_style="timestamp_func",
cast_style=cast_style,
)
query = f"""
SELECT {field_string}
Expand Down Expand Up @@ -938,10 +948,17 @@ def arrow_schema_to_bq_schema(arrow_schema: pyarrow.Schema) -> List[SchemaField]
{% if loop.last %}{% else %}, {% endif %}
{% endfor %}
FROM {{ featureview.table_subquery }}
{% if featureview.timestamp_field_type == "DATE" %}
WHERE {{ featureview.timestamp_field }} <= DATE('{{ featureview.max_event_timestamp[:10] }}')
{% if featureview.ttl == 0 %}{% else %}
AND {{ featureview.timestamp_field }} >= DATE('{{ featureview.min_event_timestamp[:10] }}')
{% endif %}
{% else %}
WHERE {{ featureview.timestamp_field }} <= '{{ featureview.max_event_timestamp }}'
{% if featureview.ttl == 0 %}{% else %}
AND {{ featureview.timestamp_field }} >= '{{ featureview.min_event_timestamp }}'
{% endif %}
{% endif %}
{% if featureview.date_partition_column %}
AND {{ featureview.date_partition_column | backticks }} <= '{{ featureview.max_event_timestamp[:10] }}'
{% if featureview.min_event_timestamp %}
Expand Down
7 changes: 7 additions & 0 deletions sdk/python/feast/infra/offline_stores/bigquery_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(
created_timestamp_column: Optional[str] = "",
field_mapping: Optional[Dict[str, str]] = None,
date_partition_column: Optional[str] = None,
timestamp_field_type: Optional[str] = None,
query: Optional[str] = None,
description: Optional[str] = "",
tags: Optional[Dict[str, str]] = None,
Expand All @@ -54,6 +55,9 @@ def __init__(
field_mapping (optional): A dictionary mapping of column names in this data source to feature names in a feature table
or view. Only used for feature columns, not entities or timestamp columns.
date_partition_column (optional): Timestamp column used for partitioning.
timestamp_field_type (optional): Type of the timestamp_field column.
Set to "DATE" when the event timestamp column is a DATE type,
so SQL generation uses date-only comparisons instead of TIMESTAMP().
query (optional): The query to be executed to obtain the features. When both 'table'
and 'query' are provided, 'query' takes priority for reads.
description (optional): A human-readable description.
Expand Down Expand Up @@ -81,6 +85,7 @@ def __init__(
created_timestamp_column=created_timestamp_column,
field_mapping=field_mapping,
date_partition_column=date_partition_column,
timestamp_field_type=timestamp_field_type,
description=description,
tags=tags,
owner=owner,
Expand Down Expand Up @@ -121,6 +126,7 @@ def from_proto(data_source: DataSourceProto):
timestamp_field=data_source.timestamp_field,
created_timestamp_column=data_source.created_timestamp_column,
date_partition_column=data_source.date_partition_column,
timestamp_field_type=data_source.timestamp_field_type or None,
query=data_source.bigquery_options.query,
description=data_source.description,
tags=dict(data_source.tags),
Expand All @@ -139,6 +145,7 @@ def _to_proto_impl(self) -> DataSourceProto:
timestamp_field=self.timestamp_field,
created_timestamp_column=self.created_timestamp_column,
date_partition_column=self.date_partition_column,
timestamp_field_type=self.timestamp_field_type,
)

return data_source_proto
Expand Down
14 changes: 12 additions & 2 deletions sdk/python/feast/infra/offline_stores/offline_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class FeatureViewQueryContext:
date_partition_column: Optional[
str
] # this attribute is added because partition pruning affects Athena's query performance.
timestamp_field_type: Optional[str]


def get_feature_view_query_context(
Expand Down Expand Up @@ -160,6 +161,10 @@ def get_feature_view_query_context(
feature_view.batch_source.date_partition_column,
)

timestamp_field_type = getattr(
feature_view.batch_source, "timestamp_field_type", ""
)

max_event_timestamp = to_naive_utc(entity_df_timestamp_range[1]).isoformat()
min_event_timestamp = None
if feature_view.ttl:
Expand All @@ -181,6 +186,7 @@ def get_feature_view_query_context(
min_event_timestamp=min_event_timestamp,
max_event_timestamp=max_event_timestamp,
date_partition_column=date_partition_column,
timestamp_field_type=timestamp_field_type or None,
)
query_context.append(context)

Expand Down Expand Up @@ -340,7 +346,7 @@ def get_timestamp_filter_sql(
date_partition_column: Optional[str] = None,
tz: Optional[timezone] = None,
cast_style: Literal[
"timestamp", "timestamp_func", "timestamptz", "raw"
"timestamp", "timestamp_func", "timestamptz", "raw", "date_func"
] = "timestamp",
date_time_separator: str = "T",
quote_fields: bool = True,
Expand All @@ -355,10 +361,11 @@ def get_timestamp_filter_sql(
date_partition_column: optional partition column (for pruning)
tz: optional timezone for datetime inputs
cast_style: one of:
- "timestamp": TIMESTAMP '...' → Common Sql engine Snowflake, Redshift etc.
- "timestamp": TIMESTAMP '...' → Common Sql engine Snowflake, Redshift etc.
- "timestamp_func": TIMESTAMP('...') → BigQuery, Couchbase etc.
- "timestamptz": '...'::timestamptz → PostgreSQL
- "raw": '...' → no cast, string only
- "date_func": DATE('...') → BigQuery DATE columns
date_time_separator: separator for datetime strings (default is "T")
(e.g. "2023-10-01T00:00:00" or "2023-10-01 00:00:00")
quote_fields: whether to quote the timestamp and partition column names
Expand All @@ -384,6 +391,9 @@ def format_casted_ts(val: Union[str, datetime]) -> str:
return f"TIMESTAMP '{val_str}'"
elif cast_style == "timestamp_func":
return f"TIMESTAMP('{val_str}')"
elif cast_style == "date_func":
date_str = val_str[:10] if len(val_str) >= 10 else val_str
return f"DATE('{date_str}')"
elif cast_style == "timestamptz":
return f"'{val_str}'::{cast_style}"
else:
Expand Down
Loading