[FIX](func) fix count distinct do not support arr/map/struct (#25483)

This commit is contained in:
amory
2023-10-19 14:04:50 +08:00
committed by GitHub
parent b45f501e51
commit ed713c2e2d
2 changed files with 71 additions and 1 deletions

View File

@ -1368,7 +1368,10 @@ public class FunctionCallExpr extends Expr {
// TODO: fix how we equal count distinct.
fn = getBuiltinFunction(fnName.getFunction(), new Type[0], Function.CompareMode.IS_NONSTRICT_SUPERTYPE_OF);
type = fn.getReturnType();
if (children.get(0).type.isComplexType()) {
throw new AnalysisException("The pattern params of " + fnName + " function can not support "
+ children.get(0).type);
}
// Make sure BE doesn't see any TYPE_NULL exprs
for (int i = 0; i < children.size(); ++i) {
if (getChild(i).getType().isNull()) {