924060929 commented on code in PR #39778:
URL: https://github.com/apache/doris/pull/39778#discussion_r1726713035
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/executable/ExecutableFunctions.java:
##########
@@ -114,6 +114,11 @@ public static Expression
appendTrailingIfCharAbsent(StringLikeLiteral literal, S
: new VarcharLiteral(literal.getValue() + chr.getValue());
}
+ @ExecFunction(name = "split_part", argTypes = {"VARCHAR", "VARCHAR",
"INT"}, returnType = "VARCHAR")
+ public static Expression splitPart(StringLikeLiteral literal,
StringLikeLiteral chr, IntegerLiteral number) {
+ return new
VarcharLiteral(literal.getValue().split(chr.getValue())[number.getValue() - 1]);
Review Comment:
I think you should not split twice
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]