godfreyhe commented on a change in pull request #16219:
URL: https://github.com/apache/flink/pull/16219#discussion_r661111525
##########
File path:
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/window/AggregateWindowOperator.java
##########
@@ -156,35 +160,55 @@ protected void compileGeneratedCode() {
@Override
protected void emitWindowResult(W window) throws Exception {
windowFunction.prepareAggregateAccumulatorForEmit(window);
+ RowData acc = aggWindowAggregator.getAccumulators();
RowData aggResult = aggWindowAggregator.getValue(window);
if (produceUpdates) {
Review comment:
Please add some tests to cover this branch
##########
File path:
flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/operators/window/TableAggregateWindowOperator.java
##########
@@ -124,6 +128,9 @@ protected void compileGeneratedCode() {
@Override
protected void emitWindowResult(W window) throws Exception {
windowFunction.prepareAggregateAccumulatorForEmit(window);
- tableAggWindowAggregator.emitValue(window, (RowData) getCurrentKey(),
collector);
+ RowData acc = tableAggWindowAggregator.getAccumulators();
+ if (!recordCounter.recordCountIsZero(acc)) {
Review comment:
please add some tests to cover this change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]