Skip to content

perf(operators): joins carry source-info tokens as recipes (ITL-1464) - #564

Closed
eywalker wants to merge 2 commits into
eywalker/itl-1464-tokensfrom
eywalker/itl-1464-tokens-joins
Closed

eywalker wants to merge 2 commits into
eywalker/itl-1464-tokensfrom
eywalker/itl-1464-tokens-joins

Conversation

@eywalker

@eywalker eywalker commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Draft, stacked on #563 (mentions ITL-1464; the issue stays open). Review only the last commit until #563 is merged; the base is #563's branch.

What

The sync paths of Join, SemiJoin, MergeJoin and Rejoin carry source-info tokens as recipes. A data-tag merged by Join (or MergeJoin) gets a fold recipe over its members; the same join_v1 fold runs when the text is made. Text stays where it must: a column whose member is text already, a column two MergeJoin inputs share (a list of both tokens), the columns that read system tags Join sorts per row (inputs of one pipeline hash). Rejoin does not compare a shared data-tag's tokens when every input has one recipe for them: they are equal wherever the system tags are, which the rows already match on.

Not touched: the streaming kernels and the async paths.

Measured

A synthetic event table of about 2.2 million rows joined with a 300-row table (22 output columns, shared data-tags): killed above 24 GiB before, 3.6 GiB after.

Review findings -> tests

A custom reader bypassed by the matching operators: test_a_match_reads_a_stream_with_its_own_read_through_it, test_a_subclass_of_a_join_reads_text. Exposure of fold recipes: closed in #563.

Tests

tests/test_core/streams/test_source_tokens.py: each matching operator against the same operation over text sources (schema, bits, rows), with two and three inputs, both orders, chains, a text member, one pipeline hash, a filtered rejoin; the fold against its members. The operator, hashing and data-tag tests pass; golden --check clean; basedpyright 0 errors.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@codecov

codecov Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/orcapod/core/operators/join.py 98.61% <100.00%> (+0.05%) ⬆️
src/orcapod/core/operators/merge_join.py 94.97% <100.00%> (+0.12%) ⬆️
src/orcapod/core/operators/rejoin.py 98.91% <100.00%> (+0.06%) ⬆️
src/orcapod/core/operators/semijoin.py 97.34% <100.00%> (+0.01%) ⬆️
src/orcapod/utils/source_tokens.py 98.27% <100.00%> (+0.47%) ⬆️

... and 1 file with indirect coverage changes

🚀 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.

…-joins

Joins read through _input_table too (review of PR 564).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@eywalker

eywalker commented Dec 2, 2026

Copy link
Copy Markdown
Contributor Author

Closing as part of the ITL-1464 draft group. The async-route work continues as ITL-1347 stage 5 (ITL-1845). The SpiralDB read work landed in #687 and #679, and continues in #683.

Posted by a Claude Code agent on behalf of @eywalker.

@eywalker eywalker closed this Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant