-
Notifications
You must be signed in to change notification settings - Fork 1k
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: earliest/latest_by_offset should accept nulls #5729
Merged
big-andy-coates
merged 21 commits into
confluentinc:master
from
big-andy-coates:nulls_by_offset
Sep 11, 2020
Merged
fix: earliest/latest_by_offset should accept nulls #5729
big-andy-coates
merged 21 commits into
confluentinc:master
from
big-andy-coates:nulls_by_offset
Sep 11, 2020
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fixes: confluentinc#5727 The `EARLIEST_BY_OFFSET` and `LATEST_BY_OFFSET` should treat a `NULL` value the same as any other value. If the first value seen is `null`, then `EARLIEST_BY_OFFSET` should return `null`. If the last value seen is `null`, then `LATEST_BY_OFFSET` should return `null`.
Ready for review |
spena
reviewed
Sep 9, 2020
ksqldb-functional-tests/src/test/resources/query-validation-tests/earliest-offset-udaf.json
Show resolved
Hide resolved
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
reviewed
Sep 9, 2020
JimGalasyn
approved these changes
Sep 9, 2020
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.
LGTM, with some copy edits.
spena
approved these changes
Sep 9, 2020
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.
LGTM
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
Co-authored-by: Jim Galasyn <jim.galasyn@confluent.io>
…o nulls_by_offset
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
fixes: #5727
Adds additional, optional,
ignoreNulls
parameter to theEARLIEST_BY_OFFSET
andLATEST_BY_OFFSET
UDAFs, that controls null handling. The default is to ignore nulls, which is inline with previous behaviour. If the user passesignoreNulls
asfalse
then the methods will treatnull
as a valid value and use it as the first/last value.To achieve this, I've removed the limit on UDAFs that said you could only have one constant parameter. UDAFs now support any number of constant parameters, (a.k.a. literals). Though they can still only have one non-constant param.
Testing done
Usual. Including adding tests around session window merging.
Reviewer checklist