ggjh-159 commented on code in PR #13558:
URL: https://github.com/apache/gluten/pull/13558#discussion_r4651547956


##########
gluten-flink/planner/src/main/java/org/apache/gluten/rexnode/AggregateCallConverter.java:
##########
@@ -44,7 +43,14 @@ public static Aggregate toAggregate(
       rawTypes.add(inputType.getChildren().get(arg));
     }
     CallTypedExpr call = toCall(aggregateCall, inputType);
-    return new Aggregate(call, rawTypes, null, List.of(), List.of(), 
aggregateCall.isDistinct());
+    FieldAccessTypedExpr mask = null;
+    if (aggregateCall.hasFilter()) {

Review Comment:
   Both shapes are already pinned by the operator tests on the velox side, 
where the mask semantics live (GroupAggregatorTest):
   
   - a null filter column: testMaskFiltersAccumulation feeds both a false and a 
null mask and asserts the row is excluded either way (Flink's rule: the 
condition must be TRUE) — nothing accumulates and no changelog row is emitted;
   - filter combined with the changelog: in the same test, a key filtered out 
in one batch and passing in the next emits the adjacent -U null / +U value 
pair, so the filter composes with update-before emission;
   - filter combined with retraction: retraction input is rejected loudly today 
(testNonInsertInputFailsLoud, testNeedRetractionPlanFailsLoud — retract support 
is a declared TODO), so there is no retraction-row path to filter yet; we will 
pin that combination when retract input lands.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to