Improve reducers no-value behavior - [MOD-7786, MOD-7787, MOD-7789, MOD-7800, MOD-7802]#5511
Merged
Improve reducers no-value behavior - [MOD-7786, MOD-7787, MOD-7789, MOD-7800, MOD-7802]#5511
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5511 +/- ##
==========================================
+ Coverage 87.18% 87.20% +0.01%
==========================================
Files 196 196
Lines 35091 35108 +17
==========================================
+ Hits 30595 30615 +20
+ Misses 4496 4493 -3 ☔ View full report in Codecov by Sentry. |
alonre24
approved these changes
Jan 19, 2025
Comment on lines
+745
to
+747
| env.expect(*query('FIRST_VALUE', 3, '@missing', 'BY', '@n')).equal([1, ['res', None]]) | ||
| env.expect(*query('FIRST_VALUE', 3, '@missing', 'BY', '@missing')).equal([1, ['res', None]]) | ||
| env.expect(*query('FIRST_VALUE', 1, '@missing')).equal([1, ['res', None]]) |
Collaborator
There was a problem hiding this comment.
Why here we are expecting Python None, but in other reducers it was nan? Is there any actual intentional difference?
Collaborator
Author
There was a problem hiding this comment.
nan is for numeric reducers, while None (or actually NULL, which redispy interprets as None) is for value reducers.
Both, of course, are in the case where no value was found for the group
Contributor
|
Successfully created backport PR for |
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jan 19, 2025
…789, MOD-7800, MOD-7802] (#5526) Improve reducers no-value behavior - [MOD-7786, MOD-7787, MOD-7789, MOD-7800, MOD-7802] (#5511) * improve reducers logic * added tests * rename test argument (cherry picked from commit 44861ce) Co-authored-by: GuyAv46 <[email protected]>
This file contains hidden or 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
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.
Describe the changes in the pull request
Improve the default value of reducers (when all the values in the group are missing)
Which additional issues this PR fixes
Reducers this PR modified
Mark if applicable