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/07 06:19:47 UTC

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

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