Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
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"