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

NPE simplifying range expressions when literal value is null

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.14.0
    • 1.14.0
    • core
    • 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

            jcamacho Jesús Camacho Rodríguez
            jcamacho Jesús Camacho Rodríguez
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: