Skip to content

fix: unparse join without projection #15693

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2025

Conversation

chenkovsky
Copy link
Contributor

@chenkovsky chenkovsky commented Apr 12, 2025

Which issue does this PR close?

Rationale for this change

There are two issues.

  1. projection in scan table is dropped in try_transform_to_simple_table_scan_with_filters
  2. projection in selectbuilder can only be setted once. it's ok if there's a projection plan outside, but for dataframe api or optimized logical plan. it's not always true. for join, we need to add selected expressions from left plan, and selected expressions from right plan.

What changes are included in this PR?

  1. add projection in try_transform_to_simple_table_scan_with_filters
  2. enable setting projection in selectbuilder twice for join logical plan.

Are these changes tested?

UT

Are there any user-facing changes?

No

@chenkovsky chenkovsky marked this pull request as ready for review April 12, 2025 14:56
@github-actions github-actions bot added the sql SQL Planner label Apr 12, 2025
@goldmedal goldmedal self-requested a review April 14, 2025 01:41
Copy link
Contributor

@goldmedal goldmedal left a comment

Choose a reason for hiding this comment

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

Thanks @chenkovsky. The change and the testing look good to me. I only have some minor comments.

@goldmedal goldmedal merged commit ac7156f into apache:main Apr 16, 2025
27 checks passed
@goldmedal
Copy link
Contributor

Thanks @chenkovsky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql SQL Planner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unparse of Joins is ignoring projections
2 participants