Skip to content

[branch-54] fix: preserve null_aware on logical JoinNode proto round-trip (backport #22104) - #22785

Merged
alamb merged 1 commit into
apache:branch-54from
mithuncy:backport-22104-branch-54
Jun 8, 2026
Merged

[branch-54] fix: preserve null_aware on logical JoinNode proto round-trip (backport #22104)#22785
alamb merged 1 commit into
apache:branch-54from
mithuncy:backport-22104-branch-54

Conversation

@mithuncy

@mithuncy mithuncy commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

This PR:

Clean cherry-pick; datafusion-proto builds and both round-trip
regression tests pass on branch-54.

…#22104)

## Summary

Closes apache#22065.

`null_aware` was missing from `JoinNode` in the logical proto
(it was added to the physical `HashJoinExecNode` in apache#19635). The
encoder dropped it via `..` destructuring and the decoder had no
field to restore it from, so any `to_proto` -> `from_proto` round
trip silently downgraded a null-aware LeftAnti (NOT IN semantics)
to a plain LeftAnti and returned wrong rows.

## Changes

- Add `bool null_aware = 9;` to `JoinNode`.
- Decoder switches to `Join::try_new`, plumbing `null_aware` and
  `null_equality` (same bug, same path) from the wire.
- Encoder destructure binds `schema: _` instead of `..`, so any
  future `Join` field is a compile error here instead of a silent
  drop.
- Decoder rejects mismatched `left_join_key`/`right_join_key`
  lengths via `proto_error`.
- Regression tests `roundtrip_join_null_aware` and
  `roundtrip_join_null_equality`, each exercising one non-default
  field.

## Test plan

- `cargo test -p datafusion-proto --test proto_integration
cases::roundtrip_logical_plan` passes.
- Clippy clean.

(cherry picked from commit 4055e44)
@github-actions github-actions Bot added the proto Related to proto crate label Jun 6, 2026
@alamb

alamb commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

The CI failure seems to have been due to some sort of infrastructure problem -- retriggered it

@alamb alamb left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you @mithuncy

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

Labels

proto Related to proto crate