Closed GoogleCodeExporter closed 9 years ago
Here's the relevant stack trace:
java.lang.NullPointerException
at edu.uci.ics.asterix.optimizer.rules.am.OptimizableFuncExpr.getConstantVal(OptimizableFuncExpr.java:100)
at edu.uci.ics.asterix.optimizer.rules.am.AccessMethodUtils.createSearchKeyExpr(AccessMethodUtils.java:297)
at edu.uci.ics.asterix.optimizer.rules.am.RTreeAccessMethod.createSecondaryToPrimaryPlan(RTreeAccessMethod.java:245)
at edu.uci.ics.asterix.optimizer.rules.am.RTreeAccessMethod.applySelectPlanTransformation(RTreeAccessMethod.java:156)
at edu.uci.ics.asterix.optimizer.rules.am.IntroduceSelectAccessMethodRule.rewritePost(IntroduceSelectAccessMethodRule.java:113)
at edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:122)
at edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:96)
at edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:108)
at edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:96)
at edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:96)
at edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:96)
at edu.uci.ics.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:96)
at edu.uci.ics.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:49)
at edu.uci.ics.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:91)
at edu.uci.ics.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:78)
at edu.uci.ics.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:83)
at edu.uci.ics.asterix.api.common.APIFramework.compileQuery(APIFramework.java:308)
at edu.uci.ics.asterix.aql.translator.AqlTranslator.rewriteCompileQuery(AqlTranslator.java:1722)
at edu.uci.ics.asterix.aql.translator.AqlTranslator.handleQuery(AqlTranslator.java:2034)
at edu.uci.ics.asterix.aql.translator.AqlTranslator.compileAndExecute(AqlTranslator.java:315)
at edu.uci.ics.asterix.api.http.servlet.APIServlet.doPost(APIServlet.java:97)
Original comment by sjaco...@ucr.edu
on 8 Dec 2014 at 10:04
The simple description of the issue here is that the optimizer treats the
spatial-intersect as if it is being used for a selection rather than for a join.
Original comment by sjaco...@ucr.edu
on 8 Dec 2014 at 10:17
You should also try the query which is inside the AQL function (which is inside
create function... body) in your query. Meaning replace the call to the
function NearbyTweetsContainingText($sub.location) with the actual query that
is inside the function body. If that works we can eliminate the function part.
If it also fails w/o the function, then the problem is not specific to the
create function.
Original comment by khfaraaz82
on 8 Dec 2014 at 10:28
I have already tried it this way, It works correctly (and incidentally it uses
the index)
Original comment by sjaco...@ucr.edu
on 8 Dec 2014 at 10:36
Ok, I see so the NPE is seen only when you define the function, and the
function has the AQL query in its definition.
Original comment by khfaraaz82
on 8 Dec 2014 at 10:42
Exactly.
Original comment by sjaco...@ucr.edu
on 8 Dec 2014 at 10:47
Original comment by sjaco...@ucr.edu
on 15 Dec 2014 at 7:06
This bug was actually caused by the problem in issue838
Original comment by sjaco...@ucr.edu
on 17 Dec 2014 at 9:59
Original issue reported on code.google.com by
sjaco...@ucr.edu
on 8 Dec 2014 at 8:28