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

NPE simplifying range expressions when literal value is null

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.14.0
    • Fix Version/s: 1.14.0
    • Component/s: core
    • Labels:
      None

      Description

      The problem is that we do not check for null literal values before going into the method that tries to simplify the ranges.

      java.lang.NullPointerException: null
              at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:191) ~[guava-14.0.1.jar:?]
              at com.google.common.collect.Cut$AboveValue.<init>(Cut.java:301) ~[guava-14.0.1.jar:?]
              at com.google.common.collect.Cut.aboveValue(Cut.java:296) ~[guava-14.0.1.jar:?]
              at com.google.common.collect.Range.atMost(Range.java:249) ~[guava-14.0.1.jar:?]
              at org.apache.calcite.rex.RexSimplify.processRange(RexSimplify.java:849) ~[calcite-core-1.13.0.jar:1.13.0]
              at org.apache.calcite.rex.RexSimplify.simplifyAnd2ForUnknownAsFalse(RexSimplify.java:668) ~[calcite-core-1.13.0.jar:1.13.0]
              at org.apache.calcite.rex.RexSimplify.simplifyAnds(RexSimplify.java:226) ~[calcite-core-1.13.0.jar:1.13.0]
              at org.apache.calcite.tools.RelBuilder.filter(RelBuilder.java:811) ~[calcite-core-1.13.0.jar:1.13.0]
              at org.apache.calcite.tools.RelBuilder.filter(RelBuilder.java:801) ~[calcite-core-1.13.0.jar:1.13.0]
      ...
      

        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: