Skip to content

[CALCITE-7587] RelDecorrelator fails on correlated scalar subquery with ROW_NUMBER window function due to RexOver nullability mismatch#4998

Open
iwanttobepowerful wants to merge 1 commit into
apache:mainfrom
iwanttobepowerful:CALCITE-7587
Open

[CALCITE-7587] RelDecorrelator fails on correlated scalar subquery with ROW_NUMBER window function due to RexOver nullability mismatch#4998
iwanttobepowerful wants to merge 1 commit into
apache:mainfrom
iwanttobepowerful:CALCITE-7587

Conversation

@iwanttobepowerful

Copy link
Copy Markdown
Contributor

# Correlated scalar sub-query in the SELECT list that contains a window function.
# Decorrelation must add the correlation key to the window partition and preserve nullability
# of the OVER expression after pulling it above the left correlate.
SELECT e.ename,

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.

…th ROW_NUMBER window function due to RexOver nullability mismatch
@sonarqubecloud

sonarqubecloud Bot commented Jun 6, 2026

Copy link
Copy Markdown

@mihaibudiu

Copy link
Copy Markdown
Contributor

This looks fine, but I my knowledge of the decorrelation algorithms is rather superficial, so if @suibianwanwank can weigh in we can be more confident.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants