[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 for Hopsworks training datasets and batch feature retrieval emit `feature_fg.event_time <= root_fg.event_time` to pick the latest matching record. The range predicate defeats partition pruning so every historical partition of every joined feature group is scanned on every read, and the scan grows unboundedly with daily ingestion. Add an optional `lookback` parameter to the PIT join API (on `feature_view.get_batch_data`, the three in-memory training-data methods `training_data` / `train_test_split` / `train_validation_test_split`, and the three materialised create variants `create_training_data` / `create_train_test_split` / `create_train_validation_test_split`). When set, the backend emits an additional constant-bound predicate on a single DATE partition column of the root and each joined feature group, so Spark Catalyst's PartitionFilters, Hudi's HoodieFileIndex, and flyingduck's directory walker can each prune partitions before opening files. Adds a "Lookback window for PIT joins" section to the batch-data and training-data user guides covering uniform and per-feature-group shapes, with concrete instance and dict examples and the partition- column eligibility caveat (single DATE partition column). Adds a "Combining `lookback` with other filters" section explaining the sub-query vs outer-filter pruning behaviour, including the mixed-FG outer-filter case where Catalyst inlines the dim wrap and the root loses FileScan-level pruning. 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