snuyanzin commented on code in PR #27435:
URL: https://github.com/apache/flink/pull/27435#discussion_r2701293681
##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/sql/FlinkSqlOperatorTable.java:
##########
@@ -84,94 +84,39 @@ public static synchronized FlinkSqlOperatorTable
instance(boolean isBatchMode) {
// register functions based on batch or streaming mode
final FlinkSqlOperatorTable finalInstance = instance;
- dynamicFunctions(isBatchMode)
- .forEach(
- f -> {
- finalInstance.register(f);
- });
+ dynamicFunctions(isBatchMode).forEach(finalInstance::register);
cachedInstances.put(isBatchMode, finalInstance);
}
return instance;
}
public static List<SqlFunction> dynamicFunctions(boolean isBatchMode) {
- List<SqlFunction> sqlFunctions =
- Arrays.asList(
- new FlinkTimestampDynamicFunction(
- SqlStdOperatorTable.LOCALTIME.getName(),
- SqlTypeName.TIME,
- isBatchMode) {
- @Override
- public SqlSyntax getSyntax() {
- return SqlSyntax.FUNCTION;
- }
- },
- new FlinkTimestampDynamicFunction(
- SqlStdOperatorTable.LOCALTIME.getName(),
- SqlTypeName.TIME,
- isBatchMode),
- new FlinkTimestampDynamicFunction(
- SqlStdOperatorTable.CURRENT_TIME.getName(),
- SqlTypeName.TIME,
- isBatchMode) {
- @Override
- public SqlSyntax getSyntax() {
- return SqlSyntax.FUNCTION;
- }
- },
Review Comment:
no need for this at all
instead just tweak FlinkSqlConformance
--
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]