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

ClassCastException in FilterReduceExpressionsRule

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9.0
    • Fix Version/s: 1.10.0
    • Component/s: core
    • Labels:
      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: