[FSTORE-2030] Add support for specifying lookback windows for PIT queries#583
Open
manu-sj wants to merge 1 commit into
Open
[FSTORE-2030] Add support for specifying lookback windows for PIT queries#583manu-sj wants to merge 1 commit into
manu-sj wants to merge 1 commit into
Conversation
…ries https://hopsworks.atlassian.net/browse/FSTORE-2030 PIT joins generate predicates of the form `feature_fg.event_time <= root_fg.event_time` to select the latest matching feature record. Because this is a range join rather than an equality join, partition pruning cannot eliminate older partitions of the joined feature group: the latest valid value may live in any of them. As feature groups grow with daily ingestion, every PIT query scans more historical partitions, inflating IO, shuffle volume, and execution time. [FSTORE-2030] adds an optional `lookback` parameter on `FeatureView.get_batch_data`, `create_training_data`, and the split variants. `Lookback(key=..., start=..., end=...)` declares a constant-bound window that the backend AND's onto the root FG and each joined FG. `key="partition_key"` mode places the bound on the partition column so flyingduck and Spark catalyst can prune partitions; `key="event_time"` mode emits the predicate on the event_time column with engine-dependent pruning. The user guides document the new `lookback` parameter on the batch-data and training-data flows, with worked examples for both `partition_key` and `event_time` modes. The pages call out that `start` is required and `end` is optional, and that omitting `end` falls back to the existing upper-only auto-pruning derived from `query.end_time`. The pages cross-link to each other so users on either entry point see the same vocabulary. Reviewed-by: OpenAI Codex (GPT-5 via codex-plugin-cc 1.0.4) <codex@openai.com> Signed-off-by: Manu Sathyarajan Joseph <manu.joseph@logicalclocks.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Lookback window for PIT joinstofeature_view/batch-data.mdcovering the two modes, the dict and dataclass call shapes, partition pruning behavior, and the one-sided lower-only form.feature_view/training-data.mdso users hittingcreate_training_datafind the same reference.JIRA
FSTORE-2030
Test plan
Companion PRs
logicalclocks/hopsworks-ee→ branchFSTORE-2030logicalclocks/hopsworks-api→ branchFSTORE-2030logicalclocks/loadtest→ branchFSTORE-2030