github-actions[bot] commented on code in PR #68579:
URL: https://github.com/apache/doris/pull/68579#discussion_r4226149534
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/agg/OrthogonalBitmapExprCalculate.java:
##########
@@ -64,6 +64,14 @@ private
OrthogonalBitmapExprCalculate(AggregateFunctionParams functionParams) {
super(functionParams);
}
+ @Override
+ public void checkLegalityBeforeTypeCoercion() {
+ if (!getArgument(2).isConstant()) {
+ throw new AnalysisException("The third argument of " + getName()
Review Comment:
[P2] Reject a NULL bitmap formula before aggregation. `cast(NULL AS
varchar)` is a constant and now passes this gate (and the `_count` variant),
but BE's nullable aggregate wrapper skips every row before `init_add_key` can
initialize or validate the formula. On a nonempty input, `_count` consequently
returns 0 and the bitmap variant returns an empty bitmap instead of reporting
the invalid required formula. Reject a NULL formula in both variants before the
nullable wrapper can silently convert it into an empty aggregate.
--
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]