asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yingyi Bu (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (ASTERIXDB-2011) Subquery as index when selecting element from a list
Date Fri, 11 Aug 2017 17:43:00 GMT

     [ https://issues.apache.org/jira/browse/ASTERIXDB-2011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Yingyi Bu reassigned ASTERIXDB-2011:
------------------------------------

    Assignee: Yingyi Bu

> Subquery as index when selecting element from a list
> ----------------------------------------------------
>
>                 Key: ASTERIXDB-2011
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-2011
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: COMP - Compiler
>            Reporter: Ali Alsuliman
>            Assignee: Yingyi Bu
>
> These are some examples where an internal error (null pointer exception) occurs
> (["a", "b", "c"])[  (SELECT * FROM [1,2] AS foo)[0]   ];
> (["a", "b", "c"])[  (SELECT value count(*) FROM Users)  ]; (Users dataset is empty and
would return 0. So it's within the bound of the list)
> Here is the log:
> java.lang.NullPointerException
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:186)
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:165)
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.resolveResultType(TypeComputeUtils.java:85)
> 	at org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer.computeType(AbstractResultTypeComputer.java:42)
> 	at org.apache.asterix.dataflow.data.common.ExpressionTypeComputer.getTypeForFunction(ExpressionTypeComputer.java:80)
> 	at org.apache.asterix.dataflow.data.common.ExpressionTypeComputer.getType(ExpressionTypeComputer.java:53)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.computeOutputTypeEnvironment(AssignOperator.java:92)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AlgebricksOptimizationContext.computeAndSetTypeEnvironmentForOperator(AlgebricksOptimizationContext.java:298)
> 	at org.apache.hyracks.algebricks.rewriter.rules.InferTypesRule.rewritePost(InferTypesRule.java:42)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:126)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
> 	at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialOnceRuleController.rewriteWithRuleCollection(SequentialOnceRuleController.java:44)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:102)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:82)
> 	at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:90)
> 	at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:267)
> 	at org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1805)
> 	at org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$1(QueryTranslator.java:2290)
> 	at org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(QueryTranslator.java:2390)
> 	at org.apache.asterix.app.translator.QueryTranslator.deliverResult(QueryTranslator.java:2323)
> 	at org.apache.asterix.app.translator.QueryTranslator.handleQuery(QueryTranslator.java:2302)
> 	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:370)
> 	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:253)
> 	at org.apache.asterix.api.http.server.ApiServlet.post(ApiServlet.java:153)
> 	at org.apache.hyracks.http.server.AbstractServlet.handle(AbstractServlet.java:78)
> 	at org.apache.hyracks.http.server.HttpRequestHandler.handle(HttpRequestHandler.java:70)
> 	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:55)
> 	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:36)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)
> java.lang.NullPointerException
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:186)
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:165)
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.resolveResultType(TypeComputeUtils.java:85)
> 	at org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer.computeType(AbstractResultTypeComputer.java:42)
> 	at org.apache.asterix.dataflow.data.common.ExpressionTypeComputer.getTypeForFunction(ExpressionTypeComputer.java:80)
> 	at org.apache.asterix.dataflow.data.common.ExpressionTypeComputer.getType(ExpressionTypeComputer.java:53)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.computeOutputTypeEnvironment(AssignOperator.java:92)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AlgebricksOptimizationContext.computeAndSetTypeEnvironmentForOperator(AlgebricksOptimizationContext.java:298)
> 	at org.apache.hyracks.algebricks.rewriter.rules.InferTypesRule.rewritePost(InferTypesRule.java:42)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:126)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:100)
> 	at org.apache.hyracks.algebricks.compiler.rewriter.rulecontrollers.SequentialOnceRuleController.rewriteWithRuleCollection(SequentialOnceRuleController.java:44)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.runOptimizationSets(HeuristicOptimizer.java:102)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:82)
> 	at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:90)
> 	at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:267)
> 	at org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1805)
> 	at org.apache.asterix.app.translator.QueryTranslator.lambda$handleQuery$1(QueryTranslator.java:2290)
> 	at org.apache.asterix.app.translator.QueryTranslator.createAndRunJob(QueryTranslator.java:2390)
> 	at org.apache.asterix.app.translator.QueryTranslator.deliverResult(QueryTranslator.java:2323)
> 	at org.apache.asterix.app.translator.QueryTranslator.handleQuery(QueryTranslator.java:2302)
> 	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:370)
> 	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:253)
> 	at org.apache.asterix.api.http.server.ApiServlet.post(ApiServlet.java:153)
> 	at org.apache.hyracks.http.server.AbstractServlet.handle(AbstractServlet.java:78)
> 	at org.apache.hyracks.http.server.HttpRequestHandler.handle(HttpRequestHandler.java:70)
> 	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:55)
> 	at org.apache.hyracks.http.server.HttpRequestHandler.call(HttpRequestHandler.java:36)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> 	at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message