Myracle commented on code in PR #27577:
URL: https://github.com/apache/flink/pull/27577#discussion_r4236041942
##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/BuiltInFunctionDefinitions.java:
##########
@@ -1467,12 +1461,7 @@ ANY, and(logical(LogicalTypeRoot.BOOLEAN), LITERAL)
BuiltInFunctionDefinition.newBuilder()
.name("REGEXP_INSTR")
.kind(SCALAR)
- .inputTypeStrategy(
- sequence(
- Arrays.asList("str", "regex"),
- Arrays.asList(
-
logical(LogicalTypeFamily.CHARACTER_STRING),
-
logical(LogicalTypeFamily.CHARACTER_STRING))))
+ .inputTypeStrategy(SpecificInputTypeStrategies.REGEXP)
Review Comment:
`REGEXP` is intentionally shared by all two-argument regex functions. It
requires`(str CHARACTER_STRING, regex CHARACTER_STRING)` and validates literal
regex patterns at planning time, which matches the current`REGEXP_INSTR`
signature. Validation errors use the actual call name, so they are still
reported as`REGEXP_INSTR` .
--
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]