[Bug](materialized-view) fix some bugs on create mv with percentile_approx (#26528)
1. percentile_approx have wrong symbol 2. fnCall.getParams() get obsolete childrens
This commit is contained in:
@ -518,6 +518,10 @@ public class CreateMaterializedViewStmt extends DdlStmt {
|
||||
break;
|
||||
default:
|
||||
mvAggregateType = AggregateType.GENERIC_AGGREGATION;
|
||||
if (functionCallExpr.getParams().isDistinct() || functionCallExpr.getParams().isStar()) {
|
||||
throw new AnalysisException(
|
||||
"The Materialized-View's generic aggregation not support star or distinct");
|
||||
}
|
||||
defineExpr = Function.convertToStateCombinator(functionCallExpr);
|
||||
type = defineExpr.type;
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ package org.apache.doris.catalog;
|
||||
import org.apache.doris.analysis.Expr;
|
||||
import org.apache.doris.analysis.FunctionCallExpr;
|
||||
import org.apache.doris.analysis.FunctionName;
|
||||
import org.apache.doris.analysis.FunctionParams;
|
||||
import org.apache.doris.common.AnalysisException;
|
||||
import org.apache.doris.common.FeMetaVersion;
|
||||
import org.apache.doris.common.UserException;
|
||||
@ -853,7 +854,7 @@ public class Function implements Writable {
|
||||
aggFunction.hasVarArgs(), aggFunction.isUserVisible());
|
||||
fn.setNullableMode(NullableMode.ALWAYS_NOT_NULLABLE);
|
||||
fn.setBinaryType(TFunctionBinaryType.AGG_STATE);
|
||||
return new FunctionCallExpr(fn, fnCall.getParams());
|
||||
return new FunctionCallExpr(fn, new FunctionParams(fnCall.getChildren()));
|
||||
}
|
||||
|
||||
public static FunctionCallExpr convertToMergeCombinator(FunctionCallExpr fnCall) {
|
||||
|
||||
@ -1318,15 +1318,6 @@ public class FunctionSet<T> {
|
||||
true, false, true, true));
|
||||
|
||||
//vec percentile and percentile_approx
|
||||
addBuiltin(AggregateFunction.createBuiltin("percentile",
|
||||
Lists.newArrayList(Type.BIGINT, Type.DOUBLE), Type.DOUBLE, Type.VARCHAR,
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
false, true, false, true));
|
||||
|
||||
addBuiltin(AggregateFunction.createBuiltin("percentile_approx",
|
||||
Lists.<Type>newArrayList(Type.DOUBLE, Type.DOUBLE), Type.DOUBLE, Type.VARCHAR,
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user