[Chore](function) set normal function use_default_implementation_for_constants to default (#27891)
set normal function use_default_implementation_for_constants to default
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
package org.apache.doris.nereids.trees.expressions.functions.scalar;
|
||||
|
||||
import org.apache.doris.catalog.FunctionSignature;
|
||||
import org.apache.doris.nereids.exceptions.AnalysisException;
|
||||
import org.apache.doris.nereids.trees.expressions.Expression;
|
||||
import org.apache.doris.nereids.trees.expressions.functions.AlwaysNullable;
|
||||
import org.apache.doris.nereids.trees.expressions.functions.ExplicitlyCastableSignature;
|
||||
@ -52,6 +53,16 @@ public class SubstringIndex extends ScalarFunction
|
||||
super("substring_index", arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void checkLegalityBeforeTypeCoercion() {
|
||||
for (int i = 1; i < children.size(); ++i) {
|
||||
if (!getArgument(i).isConstant()) {
|
||||
throw new AnalysisException(getName()
|
||||
+ " function except for the first argument, other parameter must be a constant.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* withChildren.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user