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

Unparse inner join with no conditions as a cross join #13460

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

phillipleblanc
Copy link
Contributor

@phillipleblanc phillipleblanc commented Nov 18, 2024

Which issue does this PR close?

Closes #13459

Rationale for this change

This fixes the unparser to explicitly treat inner JOIN with no conditions as a CROSS JOIN, which works for all database systems. DataFusion treats inner joins with no conditions as a CROSS JOIN - but not all database systems the unparser targets support that.

What changes are included in this PR?

When generating the SQL AST for an Inner join with no conditions, return a CROSS JOIN operator instead.

Are these changes tested?

Yes

Are there any user-facing changes?

No API changes.

@github-actions github-actions bot added the sql SQL Planner label Nov 18, 2024
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.

👍 thanks @phillipleblanc

@goldmedal goldmedal merged commit 1a09adf into apache:main Nov 19, 2024
26 checks passed
@goldmedal
Copy link
Contributor

Thanks @phillipleblanc and @alamb for reviewing

@phillipleblanc phillipleblanc deleted the phillip/241118-cross-join-upstream branch November 19, 2024 03:21
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 inner join with no conditions as a cross join
3 participants