Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2448

NullPointerException in IntroduceSelectAccessMethodRule with 2 indexes and between operator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • COMP - Compiler
    • None

    Description

      NullPointerException is thrown when index intersection is chosen by the IntroduceSelectAccessMethodRule and there's a between operator.

      DDL: 

      create index idx_custkey on Orders (o_custkey) type btree;
      create index idx_orderpriority on Orders (o_orderpriority) type btree;

      Query:

      select o_custkey, o_orderkey, o_orderstatus from Orders
      where
      o_orderpriority = '1-URGENT' and
      o_custkey between 40 and 43
      order by o_custkey, o_orderkey

      Exception:

      java.lang.NullPointerException: null
      at org.apache.asterix.optimizer.rules.am.IntroduceSelectAccessMethodRule.connectAll2ndarySearchPlanWithIntersect(IntroduceSelectAccessMethodRule.java:264) ~[classes/:?]
      at org.apache.asterix.optimizer.rules.am.IntroduceSelectAccessMethodRule.intersectAllSecondaryIndexes(IntroduceSelectAccessMethodRule.java:232) ~[classes/:?]

      Workaround:

      Use "<=" and ">=" instead of "between"

       

       

      Attachments

        Activity

          People

            dlychagin-cb Dmitry Lychagin
            dlychagin-cb Dmitry Lychagin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: