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 2020/02/05 12:00:08 UTC

[GitHub] [flink] docete opened a new pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

docete opened a new pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021
 
 
   …larOperatorGens::generateCast
   
   
   ## What is the purpose of the change
   
   ScalarOperatorGens::generateCast would produce obscure error message such as `Unsupported cast from 'ROW' to 'ROW'.` if we want cast one RowType to another.Users are unlikely to figure out what goes wrong from the above error message. Something like `Unsupported cast from 'ROW<DECIMAL(2,1), CHAR(3)>' to 'ROW<DOUBLE, VARCHAR(10)>' `will be more helpful. This PR would fix this.
   
   ## Brief change log
   
   - 0396817 Use `LogicalType` instead of `LogicalTypeRoot` to produce clear error message.
   
   ## Verifying this change
   
   This change added tests to verify
   
   ## 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, Yarn/Mesos, 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#discussion_r376231296
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/RowTypeTest.scala
 ##########
 @@ -129,4 +128,17 @@ class RowTypeTest extends RowTypeTestBase {
       "null"
     )
   }
+
+  @Test
+  def testUnsupportedCast(): Unit = {
+    expectedException.expect(classOf[ValidationException])
+    expectedException.expectMessage(
+      "Unsupported cast from Row(f0: String, f1: Boolean) to Long")
+
+    testTableApi(
+      'f5.cast(DataTypes.BIGINT()),
 
 Review comment:
   Ah... This is table api, we want to fix sql api.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] wuchong commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
wuchong commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#discussion_r376230408
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/RowTypeTest.scala
 ##########
 @@ -129,4 +128,17 @@ class RowTypeTest extends RowTypeTestBase {
       "null"
     )
   }
+
+  @Test
+  def testUnsupportedCast(): Unit = {
+    expectedException.expect(classOf[ValidationException])
+    expectedException.expectMessage(
+      "Unsupported cast from Row(f0: String, f1: Boolean) to Long")
+
+    testTableApi(
+      'f5.cast(DataTypes.BIGINT()),
 
 Review comment:
   This test case can't reproduce the problem which reported by this issue. You should add a test case which cast a ROW to another ROW, e.g. 
   
   ```scala
   testSqlApi("CAST(f5 AS ROW<f0 INT, f1 STRING>)", "")
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-582382675
 
 
   <!--
   Meta data
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147536900 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   Hash:6569bb9fdc622da86b48abe6b00263e720d5bbe8 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4930 TriggerType:PUSH TriggerID:6569bb9fdc622da86b48abe6b00263e720d5bbe8
   Hash:6569bb9fdc622da86b48abe6b00263e720d5bbe8 Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/147878472 TriggerType:PUSH TriggerID:6569bb9fdc622da86b48abe6b00263e720d5bbe8
   -->
   ## CI report:
   
   * 0396817cd5d850704f3edc7b8196473afcd00cdf Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/147536900) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863) 
   * 6569bb9fdc622da86b48abe6b00263e720d5bbe8 Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/147878472) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4930) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] docete commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
docete commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#discussion_r376236562
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/RowTypeTest.scala
 ##########
 @@ -129,4 +128,17 @@ class RowTypeTest extends RowTypeTestBase {
       "null"
     )
   }
+
+  @Test
+  def testUnsupportedCast(): Unit = {
+    expectedException.expect(classOf[ValidationException])
+    expectedException.expectMessage(
+      "Unsupported cast from Row(f0: String, f1: Boolean) to Long")
+
+    testTableApi(
+      'f5.cast(DataTypes.BIGINT()),
 
 Review comment:
   OK, Added a sql api test.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-582382675
 
 
   <!--
   Meta data
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147536900 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   Hash:6569bb9fdc622da86b48abe6b00263e720d5bbe8 Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:6569bb9fdc622da86b48abe6b00263e720d5bbe8
   -->
   ## CI report:
   
   * 0396817cd5d850704f3edc7b8196473afcd00cdf Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/147536900) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863) 
   * 6569bb9fdc622da86b48abe6b00263e720d5bbe8 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#discussion_r376231296
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/RowTypeTest.scala
 ##########
 @@ -129,4 +128,17 @@ class RowTypeTest extends RowTypeTestBase {
       "null"
     )
   }
+
+  @Test
+  def testUnsupportedCast(): Unit = {
+    expectedException.expect(classOf[ValidationException])
+    expectedException.expectMessage(
+      "Unsupported cast from Row(f0: String, f1: Boolean) to Long")
+
+    testTableApi(
+      'f5.cast(DataTypes.BIGINT()),
 
 Review comment:
   Ah... yes, this is table api, we want to fix sql api.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] docete edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
docete edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-583991670
 
 
   @wuchong  Azure fails for unstable test and fixed in https://issues.apache.org/jira/browse/FLINK-15811

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-582382675
 
 
   <!--
   Meta data
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147536900 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   Hash:6569bb9fdc622da86b48abe6b00263e720d5bbe8 Status:FAILURE URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4930 TriggerType:PUSH TriggerID:6569bb9fdc622da86b48abe6b00263e720d5bbe8
   Hash:6569bb9fdc622da86b48abe6b00263e720d5bbe8 Status:SUCCESS URL:https://travis-ci.com/flink-ci/flink/builds/147878472 TriggerType:PUSH TriggerID:6569bb9fdc622da86b48abe6b00263e720d5bbe8
   -->
   ## CI report:
   
   * 0396817cd5d850704f3edc7b8196473afcd00cdf Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/147536900) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863) 
   * 6569bb9fdc622da86b48abe6b00263e720d5bbe8 Travis: [SUCCESS](https://travis-ci.com/flink-ci/flink/builds/147878472) Azure: [FAILURE](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4930) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] docete commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
docete commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-583258144
 
 
   @wuchong pls take another look.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-582382675
 
 
   <!--
   Meta data
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147536900 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:SUCCESS URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   -->
   ## CI report:
   
   * 0396817cd5d850704f3edc7b8196473afcd00cdf Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/147536900) Azure: [SUCCESS](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#discussion_r376231669
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/test/scala/org/apache/flink/table/planner/expressions/RowTypeTest.scala
 ##########
 @@ -129,4 +128,17 @@ class RowTypeTest extends RowTypeTestBase {
       "null"
     )
   }
+
+  @Test
+  def testUnsupportedCast(): Unit = {
+    expectedException.expect(classOf[ValidationException])
+    expectedException.expectMessage(
+      "Unsupported cast from Row(f0: String, f1: Boolean) to Long")
+
+    testTableApi(
+      'f5.cast(DataTypes.BIGINT()),
 
 Review comment:
   You should keep table api and sql api both.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-582382675
 
 
   <!--
   Meta data
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:PENDING URL:https://travis-ci.com/flink-ci/flink/builds/147536900 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   -->
   ## CI report:
   
   * 0396817cd5d850704f3edc7b8196473afcd00cdf Travis: [PENDING](https://travis-ci.com/flink-ci/flink/builds/147536900) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] docete commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
docete commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-583991670
 
 
   Azure fails for unstable test and fixed in https://issues.apache.org/jira/browse/FLINK-15811

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] JingsongLi commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
JingsongLi commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#discussion_r376231355
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
 ##########
 @@ -1280,8 +1280,8 @@ object ScalarOperatorGens {
           | (INTERVAL_YEAR_MONTH, BIGINT) =>
       internalExprCasting(operand, targetType)
 
-    case (from, to) =>
-      throw new CodeGenException(s"Unsupported cast from '$from' to '$to'.")
+    case (_, _) =>
+      throw new CodeGenException(s"Unsupported cast from '${operand.resultType}' to '$targetType'.")
 
 Review comment:
   Nit: Add `''` to table api too.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] docete commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
docete commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-582763894
 
 
   Contact with Python Team and the python test failed because of FLINK-15929 (The parent process is killed for timeout when downloading dependencies). 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] docete commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
docete commented on a change in pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#discussion_r376236608
 
 

 ##########
 File path: flink-table/flink-table-planner-blink/src/main/scala/org/apache/flink/table/planner/codegen/calls/ScalarOperatorGens.scala
 ##########
 @@ -1280,8 +1280,8 @@ object ScalarOperatorGens {
           | (INTERVAL_YEAR_MONTH, BIGINT) =>
       internalExprCasting(operand, targetType)
 
-    case (from, to) =>
-      throw new CodeGenException(s"Unsupported cast from '$from' to '$to'.")
+    case (_, _) =>
+      throw new CodeGenException(s"Unsupported cast from '${operand.resultType}' to '$targetType'.")
 
 Review comment:
   modified

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-582382675
 
 
   <!--
   Meta data
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:UNKNOWN URL:TBD TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   -->
   ## CI report:
   
   * 0396817cd5d850704f3edc7b8196473afcd00cdf UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
flinkbot commented on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-582375991
 
 
   Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
   to review your pull request. We will use this comment to track the progress of the review.
   
   
   ## Automated Checks
   Last check on commit 0396817cd5d850704f3edc7b8196473afcd00cdf (Wed Feb 05 12:02:15 UTC 2020)
   
   **Warnings:**
    * No documentation files were touched! Remember to keep the Flink docs up to date!
   
   
   <sub>Mention the bot in a comment to re-run the automated checks.</sub>
   ## Review Progress
   
   * ❓ 1. The [description] looks good.
   * ❓ 2. There is [consensus] that the contribution should go into to Flink.
   * ❓ 3. Needs [attention] from.
   * ❓ 4. The change fits into the overall [architecture].
   * ❓ 5. Overall code [quality] is good.
   
   Please see the [Pull Request Review Guide](https://flink.apache.org/contributing/reviewing-prs.html) for a full explanation of the review process.<details>
    The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot approve description` to approve one or more aspects (aspects: `description`, `consensus`, `architecture` and `quality`)
    - `@flinkbot approve all` to approve all aspects
    - `@flinkbot approve-until architecture` to approve everything until `architecture`
    - `@flinkbot attention @username1 [@username2 ..]` to require somebody's attention
    - `@flinkbot disapprove architecture` to remove an approval you gave earlier
   </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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] wuchong merged pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
wuchong merged pull request #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [flink] flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…

Posted by GitBox <gi...@apache.org>.
flinkbot edited a comment on issue #11021: [FLINK-15546][table-planner-blink] Fix obscure error message from Sca…
URL: https://github.com/apache/flink/pull/11021#issuecomment-582382675
 
 
   <!--
   Meta data
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:FAILURE URL:https://travis-ci.com/flink-ci/flink/builds/147536900 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   Hash:0396817cd5d850704f3edc7b8196473afcd00cdf Status:PENDING URL:https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863 TriggerType:PUSH TriggerID:0396817cd5d850704f3edc7b8196473afcd00cdf
   -->
   ## CI report:
   
   * 0396817cd5d850704f3edc7b8196473afcd00cdf Travis: [FAILURE](https://travis-ci.com/flink-ci/flink/builds/147536900) Azure: [PENDING](https://dev.azure.com/rmetzger/5bd3ef0a-4359-41af-abca-811b04098d2e/_build/results?buildId=4863) 
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run travis` re-run the last Travis build
    - `@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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services