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/04/25 07:48:47 UTC

[GitHub] [flink] godfreyhe opened a new pull request, #19566: [FLINK-27369][table-planner] Fix the type mismatch error in RemoveUnreachableCoalesceArgumentsRule

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

   
   
   ## What is the purpose of the change
   
   *SELECT COALESCE('1', cast(NULL as varchar)), COALESCE('4', cast(NULL as varchar), cast(NULL as varchar), cast(NULL as varchar)); is failed with "Caused by: java.lang.AssertionError: Cannot add expression of different type to set: ....". This pr aims to fix it*
   
   
   ## Brief change log
   
     - *Fix the type mismatch error in RemoveUnreachableCoalesceArgumentsRule*
   
   
   ## Verifying this change
   
   
   
   This change added tests and can be verified as follows:
   
     - *Extended RemoveUnreachableCoalesceArgumentsRuleTest to verify the bug*
   
   ## 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] godfreyhe closed pull request #19566: [FLINK-27369][table-planner] Fix the type mismatch error in RemoveUnreachableCoalesceArgumentsRule

Posted by GitBox <gi...@apache.org>.
godfreyhe closed pull request #19566: [FLINK-27369][table-planner] Fix the type mismatch error in RemoveUnreachableCoalesceArgumentsRule
URL: https://github.com/apache/flink/pull/19566


-- 
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] twalthr commented on a diff in pull request #19566: [FLINK-27369][table-planner] Fix the type mismatch error in RemoveUnreachableCoalesceArgumentsRule

Posted by GitBox <gi...@apache.org>.
twalthr commented on code in PR #19566:
URL: https://github.com/apache/flink/pull/19566#discussion_r857350481


##########
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/plan/rules/logical/RemoveUnreachableCoalesceArgumentsRuleTest.java:
##########
@@ -83,4 +83,27 @@ public void testJoinCoalesce() {
         util.verifyRelPlan(
                 "SELECT * FROM T t1 LEFT JOIN T t2 ON COALESCE(t1.f0, '-', t1.f2) = t2.f0");
     }
+
+    @Test
+    public void testMultipleCoalesces() {

Review Comment:
   This test is not super helpful as it is unable to test to final result type. Can you add at least a single test to `CoalesceFunctionITCase`?



-- 
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 #19566: [FLINK-27369][table-planner] Fix the type mismatch error in RemoveUnreachableCoalesceArgumentsRule

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "eba07a30f3b3691c2768d672b649b59287b1d1ca",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "eba07a30f3b3691c2768d672b649b59287b1d1ca",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * eba07a30f3b3691c2768d672b649b59287b1d1ca 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