Visitar URL original
feat: Offline store update pull_all_from_table_or_query to make timestampfield optional by haoxu0 · Pull Request #5281 · feast-dev/feast · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
fix test
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
  • Loading branch information
haoxu0 committed Apr 18, 2025
commit 71daec23b4671d5a75b6e4b63a5afe31f7b08425
14 changes: 7 additions & 7 deletions sdk/python/feast/infra/compute_engines/spark/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ def execute(self, context: ExecutionContext) -> DAGValue:
if ENTITY_TS_ALIAS in input_df.columns:
filtered_df = filtered_df.filter(F.col(ts_col) <= F.col(ENTITY_TS_ALIAS))

# Optional TTL filter: feature.ts >= entity.event_timestamp - ttl
if self.ttl:
ttl_seconds = int(self.ttl.total_seconds())
lower_bound = F.col(ENTITY_TS_ALIAS) - F.expr(
f"INTERVAL {ttl_seconds} seconds"
)
filtered_df = filtered_df.filter(F.col(ts_col) >= lower_bound)
# Optional TTL filter: feature.ts >= entity.event_timestamp - ttl
if self.ttl:
ttl_seconds = int(self.ttl.total_seconds())
lower_bound = F.col(ENTITY_TS_ALIAS) - F.expr(
f"INTERVAL {ttl_seconds} seconds"
)
filtered_df = filtered_df.filter(F.col(ts_col) >= lower_bound)

# Optional custom filter condition
if self.filter_condition:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,6 @@ def transform_feature(df: DataFrame) -> DataFrame:
feature_view=driver_stats_fv,
full_feature_name=False,
registry=registry,
start_time=now - timedelta(days=1),
end_time=now,
)

# 🧪 Run SparkComputeEngine
Expand Down