[refactor](scan) optimize the agg function of count(1) (#18739)
This commit is contained in:
@ -458,8 +458,11 @@ public class SingleNodePlanner {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
aggExprValidate = false;
|
||||
break;
|
||||
// want to support the agg of count(const value) in dup table
|
||||
aggExprValidate = (aggOp == TPushAggOp.COUNT && child.isConstant() && !child.isNullable());
|
||||
if (!aggExprValidate) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
returnColumns.add(((SlotRef) aggExpr.getChild(0)).getDesc().getColumn());
|
||||
@ -490,8 +493,7 @@ public class SingleNodePlanner {
|
||||
break;
|
||||
}
|
||||
|
||||
if (colType.isCharFamily() && aggOp != TPushAggOp.COUNT
|
||||
&& col.getType().getLength() > 512) {
|
||||
if (colType.isCharFamily() && col.getType().getLength() > 512) {
|
||||
returnColumnValidate = false;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user