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 2019/10/16 08:29:56 UTC

[GitHub] [calcite] yanlin-Lynn commented on a change in pull request #1478: [CALCITE-3378] AssertionError for checking RexNode implify

yanlin-Lynn commented on a change in pull request #1478: [CALCITE-3378] AssertionError for checking RexNode implify
URL: https://github.com/apache/calcite/pull/1478#discussion_r335340430
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rex/RexUtil.java
 ##########
 @@ -302,7 +303,16 @@ public static RexNode removeCast(RexNode e) {
     for (;;) {
       switch (e.getKind()) {
       case CAST:
+        RelDataType destType = e.getType();
         e = ((RexCall) e).operands.get(0);
+        if (!SqlTypeUtil.canCastFrom(destType, e.getType(), true)) {
+          throw new UnsupportedOperationException(
 
 Review comment:
   PR updated.
   I add the type check for cast in `InputUsageFinder`.

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