Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1397

ClassCastException in FilterReduceExpressionsRule

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9.0
    • 1.10.0
    • core
    • None

    Description

      L184 in ReduceExpressionsRule.

      ...
              if (newConditionExp instanceof RexCall) {
                RexCall rexCall = (RexCall) newConditionExp;
                boolean reverse = rexCall.getKind() == SqlKind.NOT;
                if (reverse) {
                  rexCall = (RexCall) rexCall.getOperands().get(0);
                }
                reduceNotNullableFilter(call, filter, rexCall, reverse);
              }
      ...
      

      When we take the NOT input, we do not consider that it might not be a RexCall, which may lead to the ClassCastException.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            jcamachorodriguez Jesus Camacho Rodriguez
            jcamachorodriguez Jesus Camacho Rodriguez
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment