Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.9.7
-
None
Description
The following query fails at compile time if indexnl is specified.
DROP dataverse test if exists; CREATE dataverse test; USE test; CREATE DATASET ds1(x int, y int) PRIMARY KEY x; CREATE INDEX idx_y ON ds1(y) TYPE BTREE; insert into ds1 ([ {"x":1, "y":3 }, {"x":2, "y":4 } ]); select r1, ds1.x, ds1.y from range(0, 4) r1 left outer join ds1 on r1 /* +indexnl */ = ds1.y order by r1
Exception:
org.apache.asterix.common.exceptions.CompilationException: ASX1030: The subtree does not have any data source (in line 25, at column 6) at org.apache.asterix.optimizer.rules.am.OptimizableOperatorSubTree.getPrimaryKeyVars(OptimizableOperatorSubTree.java:437) ~[classes/:?] at org.apache.asterix.optimizer.rules.am.AccessMethodUtils.finalizeJoinPlanTransformation(AccessMethodUtils.java:859) ~[classes/:?] at org.apache.asterix.optimizer.rules.am.BTreeAccessMethod.applyJoinPlanTransformation(BTreeAccessMethod.java:300) ~[classes/:?] at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:423) ~[classes/:?]
If index join rewriting cannot be performed then the hint should be ignored instead.