Skip to content

fix(streaming_joins): MergeJoin compares settled token types with an input that delivered no rows (ITL-1362) - #522

Merged
eywalker merged 1 commit into
eywalker/job-speedfrom
eywalker/itl-1362-mergejoin-empty-input-tokens
Nov 23, 2026
Merged

eywalker merged 1 commit into
eywalker/job-speedfrom
eywalker/itl-1362-mergejoin-empty-input-tokens

Conversation

@eywalker

@eywalker eywalker commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Part of ITL-1362

Summary

This answers CodeRabbit's thread on #520 (streaming_joins.py:877), which #520 merged before it was answered.

When one input delivers no rows, the sync path reads that input in its zero-row form, which carries its declared source-info token types, and reads the other input by its rows, which carry the types its tokens settle to. MergeJoin refuses two types of one column. The kernel compared only the two inputs' settled types. So a left input whose tokens are all [] (one list level), against an empty right input declaring two levels, completed with no row and no error, while sync raises InputValidationError.

Fix: when every input has closed, StreamingMergeJoin compares each input that delivered rows, by its settled types, against every input that delivered none, by its zero-row types. It uses require_shared_arrow_type, the sync rule and its error, at the close point the close docstring describes. Join and SemiJoin need no such check: their sync paths do not compare these types.

This changes no wired path: on eywalker/job-speed, nothing in a node, pipeline module or orchestrator calls the kernels.

Finding and its test

Item Test (file::name) Fails without the fix
CodeRabbit on #520, streaming_joins.py:877 (minor): settled token types not compared with an input that delivered no rows tests/test_channels/test_record_batch_review_findings.py::test_settled_tokens_against_an_input_with_no_rows_decide_as_the_sync_path[join, merge_join, semi_join × left_empty, right_empty × one_level, two_levels]. Asserts that the kernel's outcome, the error and its message or the row count, equals the sync path's. yes: the 2 MergeJoin one-level cases; the other 10 agree with sync either way and pin it

Checks

  • Targeted, one process: tests/test_channels, the record-batch matrix, the streaming join and rejoin kernels, and the row-built form. 1,702 passed.
  • ruff check and format are clean.
  • Whole-repo basedpyright on the final head: exit 0, 0 errors.

🤖 Generated with Claude Code

…input that delivered no rows (ITL-1362)

CodeRabbit on PR 520: when one input delivers no rows, the sync path reads it in its
zero-row form (its declared source-info token types) and the other by its rows (the
types they settle to); MergeJoin refuses two types of one column. The kernel compared
the two inputs' settled types only, so a left input whose tokens are all [] (one list
level) against an empty right declaring two levels completed with no row. When every
input has closed, StreamingMergeJoin now compares each input with rows against every
input without rows (require_shared_arrow_type, the sync error).

Test: every kernel (Join, MergeJoin, SemiJoin), either input empty, tokens one or two
levels deep: the kernel's outcome equals the sync path's (the same error, or the same
rows). The two MergeJoin one-level cases fail without the fix.

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

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 2 billable files and costs up to $0.50.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 10 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 104 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 72bbbd1 and 5768e84.

Files selected for processing: 2

  • src/orcapod/core/operators/streaming_joins.py
  • tests/test_channels/test_record_batch_review_findings.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@codecov

codecov Bot commented Nov 23, 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/streaming_joins.py 98.19% <100.00%> (+0.03%) ⬆️

... and 3 files 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.

@eywalker
eywalker merged commit f018693 into eywalker/job-speed Nov 23, 2026
16 checks passed
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