github-actions[bot] commented on code in PR #66942:
URL: https://github.com/apache/doris/pull/66942#discussion_r3859766222


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/glue/translator/ExpressionTranslator.java:
##########
@@ -856,6 +857,25 @@ private FunctionCallExpr convertToStateCombinator(String 
name, FunctionCallExpr
         return new FunctionCallExpr(fn, new 
FunctionParams(fnCall.getChildren()), false);
     }
 
+    @Override
+    public Expr visitCombineCombinator(CombineCombinator combinator, 
PlanTranslatorContext context) {
+        List<Expr> arguments = combinator.children().stream()
+                .map(arg -> new SlotRef(arg.getDataType().toCatalogDataType(), 
arg.nullable()))
+                .collect(ImmutableList.toImmutableList());
+        FunctionCallExpr functionCallExpr = new FunctionCallExpr(
+                visitAggregateFunction(combinator.getNestedFunction(), 
context).getFn(),
+                new FunctionParams(false, arguments), false);
+        Function aggregateFunction = functionCallExpr.getFn();
+        aggregateFunction.setName(new FunctionName(combinator.getName()));
+        
aggregateFunction.setArgs(arguments.stream().map(Expr::getType).collect(Collectors.toList()));
+        aggregateFunction.setBinaryType(Function.BinaryType.AGG_STATE);

Review Comment:
   [P1] Fence `_combine` during cloud smooth upgrades. This translator sends 
raw arguments with `binary_type=AGG_STATE`, but the target-base BE treats every 
AGG_STATE function as a one-argument merge/union consumer. Base and head both 
advertise execution version 13, and cloud worker selection can still choose an 
`isSmoothUpgradeSrc` BE because `Backend.isQueryAvailable()` does not exclude 
it. `avg_combine(INT)` then fails old-BE prepare (`input type must be 
agg_state`; multi-argument combines fail arity). Please add an 
execution-version/backend-capability or smooth-upgrade-source fence and cover 
mixed-version scheduling.



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