You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following variant of BI-13 raises a compilation error (disabling prefer-indexnl option prevents this error, the indexnl hints can stay):
SET `graphix.semantics.pattern` "edge-isomorphism";
SET `graphix.evaluation.prefer-indexnl` "true";
LET
zombies = (
FROM
GRAPH SNB.Native.SNBGraph
(country:Country)<-[:IS_PART_OF]-(:City)<-[:IS_LOCATED_IN]-(zombie:Person)
LEFT MATCH
(zombie)<-[:HAS_CREATOR]-(message:Message)
WHERE
zombie.creationDate < DATETIME("2012-11-06T00:00:00") AND
country.name = "China" AND
( message IS UNKNOWN OR zombie.creationDate < DATETIME("2012-11-06T00:00:00") )
GROUP BY
zombie.id AS zombieId,
zombie.creationDate AS zombieCreationDate
LET
yearDiff = GET_YEAR(DATETIME("2012-11-06T00:00:00")) - GET_YEAR(zombieCreationDate),
monthDiff = GET_MONTH(DATETIME("2012-11-06T00:00:00")) - GET_MONTH(zombieCreationDate),
months = 12 * yearDiff + monthDiff + 1
HAVING
( COUNT(message.id) / months ) < 1
SELECT VALUE
zombieId
)
FROM
zombies z,
GRAPH SNB.Native.SNBGraph
(zombie:Person)
LET
zombieLikeCount = (
FROM
GRAPH SNB.Native.SNBGraph
(zombie)<-[:HAS_CREATOR]-(:Message)<-[:LIKES]-(likerZombie:Person),
zombies lz
WHERE
likerZombie.id /*+indexnl*/ = lz AND
likerZombie.creationDate < DATETIME("2012-11-06T00:00:00")
SELECT VALUE
COUNT (DISTINCT likerZombie.id)
)[0],
totalLikeCount = (
FROM
GRAPH SNB.Native.SNBGraph
(zombie)<-[:HAS_CREATOR]-(:Message)<-[:LIKES]-(likerPerson:Person)
WHERE
likerPerson.creationDate < DATETIME("2012-11-06T00:00:00")
SELECT VALUE
COUNT(DISTINCT likerPerson.id)
)[0],
zombieScore = CASE
WHEN totalLikeCount = 0
THEN 0.0
ELSE zombieLikeCount / totalLikeCount
END
WHERE
z /*+indexnl*/ = zombie.id
SELECT
zombie.id AS zombieId,
zombieLikeCount AS zombieLikeCount,
totalLikeCount AS totalLikeCount,
zombieScore AS zombieScore
ORDER BY
zombieScore DESC,
zombieId ASC
LIMIT
100;
With the following compilation error (index out-of-bounds error):
java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0
at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248) ~[?:?]
at java.util.Objects.checkIndex(Objects.java:372) ~[?:?]
at java.util.ArrayList.get(ArrayList.java:459) ~[?:?]
at org.apache.asterix.optimizer.rules.am.AccessMethodUtils.createFinalIndexOnlySearchPlan(AccessMethodUtils.java:1609) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.AccessMethodUtils.createRestOfIndexSearchPlan(AccessMethodUtils.java:1830) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.BTreeAccessMethod.createBTreeIndexSearchPlan(BTreeAccessMethod.java:695) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.BTreeAccessMethod.createIndexSearchPlan(BTreeAccessMethod.java:332) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.BTreeAccessMethod.applyJoinPlanTransformation(BTreeAccessMethod.java:300) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:455) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.checkAndApplyJoinTransformation(IntroduceJoinAccessMethodRule.java:270) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.optimizer.rules.am.IntroduceJoinAccessMethodRule.rewritePre(IntroduceJoinAccessMethodRule.java:143) ~[asterix-algebra-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:79) ~[algebricks-core-0.3.9-SNAPSHOT.jar:0.3.9-SNAPSHOT]
at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:52) ~[algebricks-compiler-0.3.9-SNAPSHOT.jar:0.3.9-SNAPSHOT]
at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:92) ~[algebricks-core-0.3.9-SNAPSHOT.jar:0.3.9-SNAPSHOT]
at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runLogicalOptimizationSets(HeuristicOptimizer.java:83) ~[algebricks-core-0.3.9-SNAPSHOT.jar:0.3.9-SNAPSHOT]
at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:63) ~[algebricks-core-0.3.9-SNAPSHOT.jar:0.3.9-SNAPSHOT]
at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$CompilerImpl.optimize(HeuristicCompilerFactoryBuilder.java:163) ~[algebricks-compiler-0.3.9-SNAPSHOT.jar:0.3.9-SNAPSHOT]
at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:268) ~[asterix-app-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:3733) ~[asterix-app-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
at org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$2(QueryTranslator.java:4646) ~[asterix-app-0.9.9-SNAPSHOT.jar:0.9.9-SNAPSHOT]
The text was updated successfully, but these errors were encountered:
The following variant of BI-13 raises a compilation error (disabling
prefer-indexnl
option prevents this error, theindexnl
hints can stay):With the following compilation error (index out-of-bounds error):
The text was updated successfully, but these errors were encountered: