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:
[email protected]


With regards,
Apache Git Services

Reply via email to