Skip to content

Fix: the fields output by Using are not determined by JoinType - #401

Open
goransh-walia wants to merge 1 commit into
KipData:mainfrom
goransh-walia:fix/issue-205-687
Open

goransh-walia wants to merge 1 commit into
KipData:mainfrom
goransh-walia:fix/issue-205-687

Conversation

@goransh-walia

Copy link
Copy Markdown

Fixes #205

What problem does this PR solve?

Issue link: #205

Columns output by USING were previously determined by JoinType, causing incorrect expression evaluation and column hiding behavior in joins.

What is changed and how it works?

  • Modified UsingColumn::expr() in src/binder/mod.rs to always generate a ScalarExpression::Coalesce containing both left and right column expressions typed with LogicalType::max_logical_type, rather than selecting expressions based on JoinType.
  • Modified UsingColumn::hides_column() to always hide right_column instead of choosing between left_column and right_column based on whether the join was a right outer join.
  • Renamed join_type to _join_type in UsingColumn.

Code changes

  • Has Rust code change
  • Has CI related scripts change

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Note for reviewer

The full test suite was not run locally, so I'm relying on CI to confirm.

AI-assisted.

@KKould KKould changed the title Fix: Fix: the fields output by Using are not determined by JoinType Fix: the fields output by Using are not determined by JoinType Nov 11, 2026
@KKould KKould assigned KKould and goransh-walia and unassigned KKould Nov 11, 2026
@KKould
KKould self-requested a review November 11, 2026 11:05
@KKould KKould added the bug Something isn't working label Nov 11, 2026
@KKould

KKould commented Nov 11, 2026

Copy link
Copy Markdown
Member

Thank you for your contribution; you can try running make test-all to test it locally.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: the fields output by Using are not determined by JoinType

2 participants