linrrzqqq commented on code in PR #66050:
URL: https://github.com/apache/doris/pull/66050#discussion_r3679951103
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/functions/scalar/RegexpExtractAllArray.java:
##########
@@ -38,20 +39,32 @@
* Returns all matches of a regex pattern as an Array<String> instead of
a string-formatted array.
*/
public class RegexpExtractAllArray extends ScalarFunction
- implements BinaryExpression, ExplicitlyCastableSignature,
AlwaysNullable, PropagateNullLiteral {
+ implements ExplicitlyCastableSignature, AlwaysNullable,
PropagateNullLiteral {
public static final List<FunctionSignature> SIGNATURES = ImmutableList.of(
FunctionSignature.ret(ArrayType.of(VarcharType.SYSTEM_DEFAULT))
.args(VarcharType.SYSTEM_DEFAULT,
VarcharType.SYSTEM_DEFAULT),
FunctionSignature.ret(ArrayType.of(StringType.INSTANCE))
- .args(StringType.INSTANCE, StringType.INSTANCE)
+ .args(StringType.INSTANCE, StringType.INSTANCE),
+ FunctionSignature.ret(ArrayType.of(VarcharType.SYSTEM_DEFAULT))
Review Comment:
It's better not to change the parameter limit from two to a hard limit of
three. I think support variable parameters is better.
Doris's version upgrades are generally rolling upgrades, first upgrading the
backend (be) and then the frontend (fe).An old FE sends two arguments to a new
BE, while a new FE pads two-argument SQL calls to three arguments and therefore
cannot execute them on an old BE.
Could we keep the original two-argument expression shape and make the new BE
accept both 2 and 3 arguments? When only two arguments are provided, the BE can
simply use group index 1 as the default. This would preserve existing
two-argument queries during a rolling upgrade
--
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]