Skip to content
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

Substrait: Handle multiple select with the same table/columns in INTERSECT #6059

Merged
merged 1 commit into from
Apr 23, 2023

Conversation

nseekhao
Copy link
Contributor

Which issue does this PR close?

Closes #6058.

Rationale for this change

Please refer to related issue.

What changes are included in this PR?

  • Producer: handle duplicate qualified fields by returning the join's output schema
  • Consumer: handle duplicate qualified fields by returning the join's output schema
  • Test: add test with INTERSECT with table/column reuse

Are these changes tested?

Yes

Are there any user-facing changes?

No

cargo fmt

cargo clippy --fix

cleanup
@github-actions github-actions bot added the substrait Changes to the substrait crate label Apr 19, 2023
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Looks a little hairy to me, but it makes sense that the join expressions need to be resolved in terms of the input schema (rather than the output schema, which is what build_join_schema makes).

cc @waynexia in case you have other thoughts

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

This change also makes sense to me, thanks for writing and reviewing it 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
substrait Changes to the substrait crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Substrait: duplicate qualified fields error in INTERSECT when reusing the same tables and columns
3 participants