raminqaf commented on code in PR #28189:
URL: https://github.com/apache/flink/pull/28189#discussion_r3258236947


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/expressions/converter/DirectConvertRule.java:
##########
@@ -197,8 +197,6 @@ void initNonDynamicFunctions() {
                 BuiltInFunctionDefinitions.REPEAT, 
FlinkSqlOperatorTable.REPEAT);
         definitionSqlOperatorHashMap.put(
                 BuiltInFunctionDefinitions.REGEXP, 
FlinkSqlOperatorTable.REGEXP);
-        definitionSqlOperatorHashMap.put(

Review Comment:
    The `DirectConvertRule` entry maps a `BuiltInFunctionDefinition` to a 
legacy `FlinkSqlOperatorTable SqlFunction`. Keeping it routes the Table API 
conversion through that legacy `SqlFunction`, which uses Calcite's 
`OperandTypes` for validation — bypassing the new 
`RegexpReplaceInputTypeStrategy`. To make plan-time validation fire on both SQL 
and Table API, `REGEXP_REPLACE` has to go through `BridgingSqlFunction`, which 
means removing both the `FlinkSqlOperatorTable` entry and this 
`DirectConvertRule` mapping.
   
   `REGEXP` above is intentionally untouched: it's the next sub-task of the 
FLINK-39648 umbrella (separate JIRA). Same fix shape will pply there; will be 
done in its own PR so this one stays focused.



-- 
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]

Reply via email to