fix(workflow-operator): emit only filled reservoir slots in onFinish#5411
Closed
Ma77Ball wants to merge 5 commits into
Closed
fix(workflow-operator): emit only filled reservoir slots in onFinish#5411Ma77Ball wants to merge 5 commits into
Ma77Ball wants to merge 5 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5411 +/- ##
============================================
+ Coverage 51.62% 51.67% +0.04%
- Complexity 2420 2430 +10
============================================
Files 1056 1056
Lines 41046 41047 +1
Branches 4407 4407
============================================
+ Hits 21190 21211 +21
+ Misses 18617 18594 -23
- Partials 1239 1242 +3
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
@Ma77Ball please make sure to follow our PR template. closed for now. please feel free to reopen it once you update the PR. |
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.
What
ReservoirSamplingOpExec.onFinishemittednulltuples when the input size was less thank. Fixed by emitting only thenpopulated reservoir slots viareservoir.iterator.take(n).Why
The reservoir is a fixed-size
Array[Tuple](k). With fewer thankinputs the trailing slots staynulland were returned byonFinish. Today they are silently dropped by the null-check inDataProcessor.outputOneTuple(DataProcessor.scala:157), so there is no crash, but it violates the operator contract and any other consumer of the output would observe the nulls.Test
Regression test asserts no null padding when input size is less than
k. Verified it fails on the oldreservoir.iteratorand passes withtake(n).Notes
Stacked on #5384 (the ReservoirSamplingOpExec spec) until that merges, so the diff temporarily shows that PR's spec additions. After #5384 merges to main this rebases cleanly.
Closes #5409