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

allow window UDF to return null #6915

Merged
merged 1 commit into from
Jul 11, 2023
Merged

allow window UDF to return null #6915

merged 1 commit into from
Jul 11, 2023

Conversation

mhilton
Copy link
Contributor

@mhilton mhilton commented Jul 11, 2023

Which issue does this PR close?

Closes #6914.

Rationale for this change

What changes are included in this PR?

The schema produced by the WindowUDF physical expression is now marked as being nullable.

Are these changes tested?

Yes, in the user_defined_integration tests.

Are there any user-facing changes?

No

Update the schema produced by the WindowUDF expression to allow
user-defined window functions to return NULL.
@github-actions github-actions bot added the core Core DataFusion crate label Jul 11, 2023
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.

Thank you @mhilton -- this looks great

@@ -365,6 +398,8 @@ struct TestState {
supports_bounded_execution: bool,
/// should the functions they need include rank
include_rank: bool,
/// should the functions return NULL for 0s?
Copy link
Contributor

Choose a reason for hiding this comment

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

❤️

@alamb alamb merged commit 19c4253 into apache:main Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

User-defined Window Functions cannot return NULL
2 participants