-
Notifications
You must be signed in to change notification settings - Fork 591
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
fix(agg): fix first_value
and last_value
to not ignore NULLs
#19332
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
first_value
and last_value
to not ignore NULLs
cbd44a1
to
088edaa
Compare
088edaa
to
8e9b078
Compare
if let Some(state) = &state.0 { | ||
state.clone() | ||
} else { | ||
None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this lead to breaking changes? Since we ignore nulls previously.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If so we need to include a release note.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
8e9b078
to
7f5b7c7
Compare
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
Signed-off-by: Richard Chien <[email protected]>
7f5b7c7
to
155765d
Compare
Merge activity
|
) Signed-off-by: Richard Chien <[email protected]>
) (#19365) Signed-off-by: Richard Chien <[email protected]> Co-authored-by: Richard Chien <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
To align behavior with PG, we should not ignore NULLs when computing
first_value
andlast_value
.This PR affects batch aggregate, batch over window. Also, a previous PR #19233 has already changed the behavior of streaming over window to the correct one.
Fixes #18927.
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
first_value
andlast_value
in batch aggregate query and both batch & streaming window function query to align with PostgreSQL, so that they don't ignore NULL values. This may be a breaking change if you have streaming jobs containingfirst_value
/last_value
window function calls and there are NULL values before.