Skip to content

Conversation

@berkaysynnada
Copy link
Contributor

Which issue does this PR close?

Closes #14108.

Rationale for this change

Please see the issue.

What changes are included in this PR?

Aliased window expr is handled as if it is a normal window expr

Are these changes tested?

Yes, with an .slt test, which was failing before

Are there any user-facing changes?

@github-actions github-actions bot added optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt) labels Jan 13, 2025
Copy link
Contributor

@ozankabak ozankabak left a comment

Choose a reason for hiding this comment

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

LGTM

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.

extract_partition_keys(window_func)
} else {
// window functions expressions are only Expr::WindowFunction
unreachable!()
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we can turn this into returning an internal error rather than a panic for safety

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good. I think there are few of those in the codebase and it would make a good first issue to remove these unreachable panics and replace them with internal errors. Let's create an issue for this

@ozankabak ozankabak merged commit fda500a into apache:main Jan 14, 2025
25 checks passed
masonh22 pushed a commit to coralogix/arrow-datafusion that referenced this pull request Sep 23, 2025
masonh22 pushed a commit to coralogix/arrow-datafusion that referenced this pull request Sep 24, 2025
masonh22 pushed a commit to coralogix/arrow-datafusion that referenced this pull request Sep 24, 2025
avantgardnerio pushed a commit to coralogix/arrow-datafusion that referenced this pull request Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

optimizer Optimizer rules sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Aliased Window Expr enters unreachable code

3 participants