Skip to content

feat: Add change-aware incremental join PoC - #7028

Open
haoxu0 wants to merge 10 commits into
feast-dev:masterfrom
haoxu0:feat/incremental-dag-poc
Open

haoxu0 wants to merge 10 commits into
feast-dev:masterfrom
haoxu0:feat/incremental-dag-poc

Conversation

@haoxu0

@haoxu0 haoxu0 commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

What this PR does / why we need it:

Adds a minimal change-aware incremental inner-join proof of concept for the Local Compute Engine.

  • introduces engine-neutral INSERT/UPDATE/DELETE envelopes and unique-key row state
  • adds opt-in incremental initialization, topological delta routing, and atomic rollback to execution plans
  • incrementally recomputes only affected join-key partitions
  • handles changes on either side, including key-changing updates
  • propagates a join's emitted delta into downstream joins
  • compares maintained state with full Pandas batch recomputation after each mutation
  • documents the implemented boundary, production architecture gaps, and a phased RFC

This is intentionally a physical-DAG PoC. It does not wire incremental execution into the public FeatureView/FeatureBuilder path and does not provide durable state, CDC offsets, outer/temporal joins, duplicate-key multiplicity, incremental aggregation, or sink checkpoint coordination.

Which issue(s) this PR fixes:

No linked issue; RFC/PoC for review.

Checks

  • My commits are signed off (git commit -s)
  • My PR title follows conventional commits format
  • Focused and compute-engine tests pass
  • Full repository unit suite passes in this local environment

The full repository suite completed with 3357 passed and 46 skipped, but also 45 failures and 7 errors in unrelated environment-sensitive metrics, StreamFeatureView, MLflow, Chronon, Milvus, remote-registry mTLS, MCP, dependency-conflict, and existing transformation/store tests. The changed compute-engine suite is green.

Testing Strategy

  • Unit tests
  • Integration tests
  • Manual tests
  • Testing is not required for this change

Verification:

  • incremental suites: 33 passed
  • all compute-engine unit tests: 224 passed, 3 skipped
  • Local join plus existing Local node tests: 26 passed, 3 skipped
  • Ruff format/check: passed for all changed Python files
  • scoped mypy: passed for all changed production files

Misc

Design: docs/superpowers/specs/2026-10-16-change-aware-incremental-join-design.md

Implementation plan: docs/superpowers/plans/2026-10-17-change-aware-incremental-join.md

PoC guide: docs/reference/compute-engine/incremental-dag-poc.md

RFC draft: docs/rfc/change-aware-incremental-feature-dag.md

Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
Signed-off-by: HaoXuAI <sduxuhao@gmail.com>
@haoxu0
haoxu0 force-pushed the feat/incremental-dag-poc branch from 9f04e55 to 6f406af Compare October 17, 2026 07:48
@haoxu0
haoxu0 marked this pull request as ready for review October 17, 2026 07:56
@haoxu0
haoxu0 requested a review from a team as a code owner October 17, 2026 07:56
@codecov-commenter

codecov-commenter commented Oct 17, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 91.16608% with 25 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.74%. Comparing base (108c967) to head (31b21cc).

Files with missing lines Patch % Lines
...k/python/feast/infra/compute_engines/dag/change.py 92.91% 4 Missing and 5 partials ⚠️
...st/infra/compute_engines/local/incremental_join.py 88.88% 4 Missing and 4 partials ⚠️
.../python/feast/infra/compute_engines/local/nodes.py 80.00% 2 Missing and 2 partials ⚠️
sdk/python/feast/infra/compute_engines/dag/node.py 77.77% 1 Missing and 1 partial ⚠️
sdk/python/feast/infra/compute_engines/dag/plan.py 96.15% 1 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #7028      +/-   ##
==========================================
+ Coverage   52.55%   52.74%   +0.18%     
==========================================
  Files         459      461       +2     
  Lines       58202    58481     +279     
  Branches     8582     8640      +58     
==========================================
+ Hits        30590    30844     +254     
- Misses      25523    25535      +12     
- Partials     2089     2102      +13     
Flag Coverage Δ
go-feature-server 30.96% <ø> (ø)
python-unit 54.26% <91.16%> (+0.18%) ⬆️
Files with missing lines Coverage Δ
.../python/feast/infra/compute_engines/dag/context.py 90.00% <100.00%> (+0.41%) ⬆️
sdk/python/feast/infra/compute_engines/dag/node.py 74.41% <77.77%> (+0.13%) ⬆️
sdk/python/feast/infra/compute_engines/dag/plan.py 97.26% <96.15%> (-2.74%) ⬇️
.../python/feast/infra/compute_engines/local/nodes.py 86.63% <80.00%> (-0.74%) ⬇️
...st/infra/compute_engines/local/incremental_join.py 88.88% <88.88%> (ø)
...k/python/feast/infra/compute_engines/dag/change.py 92.91% <92.91%> (ø)

Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 108c967...31b21cc. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@franciscojavierarceo franciscojavierarceo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we need to preserve batch-equivalent results for accepted plan shapes, or reject those shapes during incremental initialization.

for input_name, changes in input_changes.items():
if input_name == input_names[0]:
side = candidate.left
elif input_name == input_names[1]:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when a join uses the same source node on both inputs, both input names are equal and this branch updates only candidate.left. for a source row {id: 1, value: 'old'} joined to itself on id, changing value to 'new' produces value_x='new', value_y='old' instead of updating both sides. initialization currently accepts this plan. we should apply the delta to both matching inputs, or reject repeated input names during initialization, and add a self-join regression.

f"Incremental join '{self.name}' only supports inner joins"
)
output = context.node_outputs[self.name]
output.assert_format(DAGFormat.ARROW)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

initialization accepts a non-None context.entity_df, so the seed from execute() includes its additional left join and entity columns. incremental recomputation only joins the two source states, omitting that dataframe. after the first affected update, those entity columns or unmatched entity rows disappear, or an output primary key using an entity column fails. we should reject this context during incremental initialization until that join is maintained, and add coverage for the rejection or equivalent results.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants