You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/03/22 10:05:35 UTC

[GitHub] [flink] SteNicholas commented on a change in pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

SteNicholas commented on a change in pull request #19179:
URL: https://github.com/apache/flink/pull/19179#discussion_r831989990



##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/RexNodeJsonDeserializer.java
##########
@@ -506,6 +529,29 @@ private static boolean isTemporary(SqlOperator sqlOperator) {
         }
     }
 
+    private static Optional<SqlOperator> lookupOptionalSqlOperator(
+            String operatorName, SqlSyntax syntax, @Nullable SqlKind sqlKind) {
+        List<SqlOperator> foundOperators = new ArrayList<>();
+        // try to find operator from std operator table.
+        SqlStdOperatorTable.instance()
+                .lookupOperatorOverloads(
+                        new SqlIdentifier(operatorName, new SqlParserPos(0, 0)),
+                        null, // category
+                        syntax,
+                        foundOperators,
+                        SqlNameMatchers.liberal());
+        if (foundOperators.size() == 1) {

Review comment:
       Could this similify to `foundOperators.stream().filter(operator->sqlKind != null && operator.kind == sqlKind).findFirst()`?




-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org