Skip to content

test(operator): add RIGHT OUTER, FULL OUTER, and NULL key join tests#49

Merged
poyrazK merged 2 commits intomainfrom
feat/join-tests
Apr 19, 2026
Merged

test(operator): add RIGHT OUTER, FULL OUTER, and NULL key join tests#49
poyrazK merged 2 commits intomainfrom
feat/join-tests

Conversation

@poyrazK
Copy link
Copy Markdown
Owner

@poyrazK poyrazK commented Apr 19, 2026

Summary

  • Add 3 new unit tests for HashJoin operator edge cases:
    • HashJoinRightOuter: verify RIGHT JOIN outputs unmatched right rows with NULLs
    • HashJoinFullOuter: verify FULL OUTER JOIN outputs unmatched rows on both sides
    • HashJoinNullKeys: document current NULL key matching behavior (non-standard SQL)

Test plan

  • Build and run operator_tests (29 tests pass)

Summary by CodeRabbit

  • Tests
    • Added comprehensive test coverage for join operations, including right outer joins, full outer joins, and NULL-key handling scenarios.
    • New tests validate correct output for matched and unmatched rows, ensuring robust NULL value handling across different join types.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 19, 2026

Warning

Rate limit exceeded

@github-actions[bot] has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 49 minutes and 15 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 49 minutes and 15 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ea751bef-9d71-41b8-9c8b-35708b839d15

📥 Commits

Reviewing files that changed from the base of the PR and between e2d16df and b008e91.

📒 Files selected for processing (1)
  • tests/operator_tests.cpp
📝 Walkthrough

Walkthrough

Added three new unit tests to tests/operator_tests.cpp to validate HashJoinOperator behavior across Right, Full outer, and Inner join types with NULL-key handling. Tests verify result correctness for each join scenario without modifying existing test cases.

Changes

Cohort / File(s) Summary
HashJoin Operator Tests
tests/operator_tests.cpp
Added three new test cases (HashJoinRightOuter, HashJoinFullOuter, HashJoinNullKeys) to validate join operator functionality for right outer, full outer, and null-key scenarios, verifying matched/unmatched row handling and NULL propagation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Poem

🐰 Three tests hop into the test suite with cheer,
Right and Full outer joins, now crystal clear,
NULL keys tested with careful attention,
Edge cases covered—a rabbit's invention! 🐇✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding three new join operator tests for RIGHT OUTER, FULL OUTER, and NULL key scenarios.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/join-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/operator_tests.cpp`:
- Around line 887-900: The test is currently skipping rows where both
tuple.get(0).is_null() and tuple.get(1).is_null(), which hides whether NULL keys
match; change the loop so it does not skip that case: when both are NULL, still
record the match (e.g., push a sentinel pair such as {INT64_MIN, INT64_MIN} or
otherwise record that a NULL/NULL row was found) instead of continuing, and then
update the expectations to assert the NULL/NULL match is present (e.g., expect
two results and verify one is the (1,1) row and the other indicates the
NULL/NULL match); use the existing symbols join->next(tuple),
tuple.get(...).is_null(), and tuple.get(...).to_int64() to implement this.
- Around line 797-809: The test only checks left nullability and not the actual
key values; update the assertions after the join->next(tuple) loop to validate
the actual right-side keys and the matched left value: when
tuple.get(0).is_null() is false assert tuple.get(0).to_int64() == 2 and
tuple.get(1).to_int64() == 2 for the matched row, and for the two unmatched rows
assert tuple.get(0).is_null() is true and that tuple.get(1).to_int64() equals 3
and 4 (in the expected order or by comparing a multiset if order is not
guaranteed); use the existing tuple.get(0) and tuple.get(1) calls to locate and
verify these values instead of only checking nullability.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: ba037eeb-80f3-4cb3-ba8e-d0406a021964

📥 Commits

Reviewing files that changed from the base of the PR and between f713174 and e2d16df.

📒 Files selected for processing (1)
  • tests/operator_tests.cpp

Comment thread tests/operator_tests.cpp Outdated
Comment thread tests/operator_tests.cpp Outdated
Copy link
Copy Markdown
Owner Author

@poyrazK poyrazK left a comment

Choose a reason for hiding this comment

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

It's okay to merge

@poyrazK poyrazK merged commit 38160d7 into main Apr 19, 2026
1 check passed
@poyrazK poyrazK deleted the feat/join-tests branch April 19, 2026 16:42
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