branch-2.1: [feat](function) SUBSTRING_INDEX function delimiter supports dynamic #50149 (#50303)

Cherry-picked from #50149

Co-authored-by: lw112 <131352377+felixwluo@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-04-23 15:00:40 +08:00
committed by GitHub
parent af0bca698a
commit 98f5d95fba
8 changed files with 549 additions and 40 deletions

View File

@ -18,7 +18,6 @@
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.ExplicitlyCastableSignature;
import org.apache.doris.nereids.trees.expressions.functions.PropagateNullable;
@ -53,16 +52,6 @@ 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.
*/