Skip to content

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

Merged
goldmedal merged 3 commits intoapache:mainfrom
spiceai:phillip/241118-cross-join-upstream
Nov 19, 2024
Merged

Unparse inner join with no conditions as a cross join#13460
goldmedal merged 3 commits intoapache:mainfrom
spiceai:phillip/241118-cross-join-upstream

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
@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