You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2021/01/25 02:36:56 UTC

[GitHub] [calcite] danny0405 commented on a change in pull request #2312: [CALCITE-4265] Improve error message when CAST to unknown type (Louis…

danny0405 commented on a change in pull request #2312:
URL: https://github.com/apache/calcite/pull/2312#discussion_r563433210



##########
File path: core/src/test/java/org/apache/calcite/test/SqlValidatorTest.java
##########
@@ -1212,17 +1212,15 @@ public void _testLikeAndSimilarFails() {
   }
 
   @Test void testCastRegisteredType() {
-    expr("cast(123 as customBigInt)")
-        .fails("class org.apache.calcite.sql.SqlIdentifier: CUSTOMBIGINT");
+    wholeExpr("cast(123 as customBigInt)")
+        .fails("Cast function does not support casting to type `CUSTOMBIGINT`");
     expr("cast(123 as sales.customBigInt)")

Review comment:
       Instead of message `Cast function does not support casting to type`, i guess `Cast from {fromType} to {toType} is not supported` is more clear ?




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