Skip to content

[CALCITE-7670] Uncollect should support LEFT JOIN UNNEST - #5149

Open
mihaibudiu wants to merge 1 commit into
apache:mainfrom
mihaibudiu:issue7670
Open

[CALCITE-7670] Uncollect should support LEFT JOIN UNNEST#5149
mihaibudiu wants to merge 1 commit into
apache:mainfrom
mihaibudiu:issue7670

Conversation

@mihaibudiu

Copy link
Copy Markdown
Contributor

Jira Link

CALCITE-7670

Changes Proposed

The Unnest operator gains a new flag "isOuter" which indicates that it is used on the RHS of a LEFT JOIN.
This enables plans which used Correlate(left=true) + Unnest to be rewritten as Correlate(left=false) + Unnest(left=true).
Some of these plans can then be completely decorrelated, which wasn't possible previously.

@mihaibudiu

Copy link
Copy Markdown
Contributor Author

This looks like a big PR, but more than half of it is just tests.

* LogicalProject
* LeftSubquery
*
* <p>@see CorrelateUncollectOuterRule

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if <p> and @see are on the same line then it will nor render as See also
not sure if it is intended behavior here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This should be fixable

@snuyanzin snuyanzin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have one minor comment

@mihaibudiu mihaibudiu added the LGTM-will-merge-soon Overall PR looks OK. Only minor things left. label Aug 8, 2026
@mihaibudiu

Copy link
Copy Markdown
Contributor Author

I plan to merge this, so if you anyone has objections, now is the time to raise them

@mihaibudiu
mihaibudiu force-pushed the issue7670 branch 2 times, most recently from 2c429aa to 46a59b4 Compare August 10, 2026 19:03
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
@sonarqubecloud

Copy link
Copy Markdown

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

Labels

LGTM-will-merge-soon Overall PR looks OK. Only minor things left.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants