[FLINK-35661][table] Fix MiniBatchGroupAggFunction silently dropping records (backport #27505)#28262
[FLINK-35661][table] Fix MiniBatchGroupAggFunction silently dropping records (backport #27505)#28262nateab wants to merge 1 commit into
Conversation
|
@flinkbot run azure Previous failure was in |
|
@flinkbot run azure |
…records When finishBundle() encounters a key with only retraction messages and no existing state, it now uses 'continue' instead of 'return' to skip that key and continue processing remaining keys in the bundle. This change adds a unit test using KeyedOneInputStreamOperatorTestHarness with KeyedMapBundleOperator to verify the fix. (cherry picked from commit b81b124)
eb3440c to
b49ec0c
Compare
|
Force-pushed identical content with new timestamp to trigger a fresh Azure build ( New SHA: The previous |
Backport of #27505 to
release-1.20.What is the purpose of the change
This pull request fixes a bug in
MiniBatchGroupAggFunction.finishBundle()where records were being silently dropped when a mini-batch bundle contained a key with only retraction messages and no existing accumulator state.The root cause was using
returninstead ofcontinuewheninputRowsbecame empty after filtering out leading retraction messages for a key with no state. This caused the method to exit entirely, abandoning processing of all remaining keys in the bundle.Brief change log
return;tocontinue;inMiniBatchGroupAggFunction.finishBundle()so processing continues to the next key instead of exiting the entire methodMiniBatchGroupAggFunctionTestthat directly verifies the fix by simulating a bundle with multiple keys where the first key has only retractionsVerifying this change
This change added tests and can be verified as follows:
MiniBatchGroupAggFunctionTest.testFinishBundleContinuesAfterEmptyInputRows()which creates a mock bundle with three keys where the first key has only a DELETE message (no existing state). The test verifies that:Backport notes:
release-1.20:Tests run: 1, Failures: 0, Errors: 0.Does this pull request potentially affect one of the following parts:
@Public(Evolving): noDocumentation