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/21 07:48:21 UTC

[GitHub] [flink] godfreyhe opened a new pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

godfreyhe opened a new pull request #19179:
URL: https://github.com/apache/flink/pull/19179


   
   ## What is the purpose of the change
   
   *This pr aims to fix the deserialization error for match recognize. The reason is: RexNodeJsonSerializer and RexNodeJsonDeserializer does not consider the SqlOperators with empty names, such as: pattern_concat, the testing logic in JsonPlanTestBase#compileSqlAndExecutePlan is not correct. *
   
   
   ## Brief change log
   
     - *Fix the ser/de logic for pattern_concat in  RexNodeJsonSerializer and RexNodeJsonDeserializer *
     - *Fix the JsonPlanTestBase#compileSqlAndExecutePlan*
   
   
   ## Verifying this change
   
   
   This change is already covered by existing tests, such as *MatchRecognizeJsonPlanTest and MatchRecognizeJsonPlanITCase*.
   
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / **not documented**)
   


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



[GitHub] [flink] flinkbot edited a comment on pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1073567241


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "1076999830",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "0848527f59c961f070ee43dea29d4872932cf8f9",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "0848527f59c961f070ee43dea29d4872932cf8f9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9e677e67f510daf93704bd46cd3d4a8672c498ec Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469) 
   * 0848527f59c961f070ee43dea29d4872932cf8f9 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



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

Posted by GitBox <gi...@apache.org>.
flinkbot commented on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1073567241


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9e677e67f510daf93704bd46cd3d4a8672c498ec UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



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

Posted by GitBox <gi...@apache.org>.
godfreyhe commented on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1080124482


   cc @twalthr 


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



[GitHub] [flink] flinkbot edited a comment on pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1073567241


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "DELETED",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "1076999830",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "0848527f59c961f070ee43dea29d4872932cf8f9",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33794",
       "triggerID" : "0848527f59c961f070ee43dea29d4872932cf8f9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 0848527f59c961f070ee43dea29d4872932cf8f9 Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33794) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [flink] flinkbot edited a comment on pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1073567241


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "1076999830",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 9e677e67f510daf93704bd46cd3d4a8672c498ec Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



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

Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #19179:
URL: https://github.com/apache/flink/pull/19179#discussion_r831998386



##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/RexNodeJsonSerializer.java
##########
@@ -397,6 +398,9 @@ static void serializeSqlOperator(
             // stack is exposed to the user and can thus be external.
             gen.writeStringField(
                     FIELD_NAME_INTERNAL_NAME, BuiltInSqlOperator.toQualifiedName(operator));
+            if (operator.getName().isEmpty()) {

Review comment:
       Why does `FIELD_NAME_SQL_KIND` field need the check whether the operator name is empty?




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



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

Posted by GitBox <gi...@apache.org>.
SteNicholas commented on a change in pull request #19179:
URL: https://github.com/apache/flink/pull/19179#discussion_r831998386



##########
File path: flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/RexNodeJsonSerializer.java
##########
@@ -397,6 +398,9 @@ static void serializeSqlOperator(
             // stack is exposed to the user and can thus be external.
             gen.writeStringField(
                     FIELD_NAME_INTERNAL_NAME, BuiltInSqlOperator.toQualifiedName(operator));
+            if (operator.getName().isEmpty()) {

Review comment:
       Why does `FIELD_NAME_SQL_KIND` field need the check whether the operator name is empty?




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



[GitHub] [flink] flinkbot edited a comment on pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1073567241


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "1076999830",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 9e677e67f510daf93704bd46cd3d4a8672c498ec Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1073567241


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9e677e67f510daf93704bd46cd3d4a8672c498ec Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1073567241


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9e677e67f510daf93704bd46cd3d4a8672c498ec Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



[GitHub] [flink] flinkbot edited a comment on pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1073567241


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "1076999830",
       "triggerType" : "MANUAL"
     } ]
   }-->
   ## CI report:
   
   * 9e677e67f510daf93704bd46cd3d4a8672c498ec Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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



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

Posted by GitBox <gi...@apache.org>.
godfreyhe commented on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1076999830


   @flinkbot run azure


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



[GitHub] [flink] flinkbot edited a comment on pull request #19179: [FLINK-26756][table-planner] Fix the deserialization error for match recognize

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on pull request #19179:
URL: https://github.com/apache/flink/pull/19179#issuecomment-1073567241


   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "triggerType" : "PUSH"
     }, {
       "hash" : "9e677e67f510daf93704bd46cd3d4a8672c498ec",
       "status" : "FAILURE",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469",
       "triggerID" : "1076999830",
       "triggerType" : "MANUAL"
     }, {
       "hash" : "0848527f59c961f070ee43dea29d4872932cf8f9",
       "status" : "PENDING",
       "url" : "https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33794",
       "triggerID" : "0848527f59c961f070ee43dea29d4872932cf8f9",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 9e677e67f510daf93704bd46cd3d4a8672c498ec Azure: [FAILURE](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33469) 
   * 0848527f59c961f070ee43dea29d4872932cf8f9 Azure: [PENDING](https://dev.azure.com/apache-flink/98463496-1af2-4620-8eab-a2ecc1a2e6fe/_build/results?buildId=33794) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


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