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] [Closed] (ASTERIXDB-1597) Ordering by aggregated field throws NullPointerException
Date Fri, 26 Aug 2016 05:24:20 GMT

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

Yingyi Bu closed ASTERIXDB-1597.
--------------------------------
    Resolution: Fixed

Fixed with a regression test.

> Ordering by aggregated field throws NullPointerException
> --------------------------------------------------------
>
>                 Key: ASTERIXDB-1597
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1597
>             Project: Apache AsterixDB
>          Issue Type: Bug
>         Environment: Master branch with latest commit 0339b475f323e6e2777dbcb13ee2
>            Reporter: Vignesh Raghunathan
>            Assignee: Yingyi Bu
>
> To reproduce the issue, run the following sqlpp statements:
> {code}
> drop dataverse sampdb if exists;
> create dataverse sampdb;
> use sampdb;
> drop dataset samptable if exists;
> drop type samptabletype if exists;
> create type samptabletype as closed {
>   id: int8
> };
> create dataset samptable1(samptabletype) primary key id;
> insert into samptable1 ({'id' : 0});
> insert into samptable1 ({'id' : 1});
> select sumid
> from (
> select sum(id) sumid from samptable1 
> ) t1
> order by sumid;
> {code}
> Result:
> {code}
> java.lang.NullPointerException
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:174)
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:153)
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.resolveResultType(TypeComputeUtils.java:84)
> 	at org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer.computeType(AbstractResultTypeComputer.java:39)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getTypeForFunction(AqlExpressionTypeComputer.java:80)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getType(AqlExpressionTypeComputer.java:53)
> 	at org.apache.hyracks.algebricks.core.algebra.typing.AbstractTypeEnvironment.getType(AbstractTypeEnvironment.java:45)
> 	at org.apache.asterix.om.typecomputer.impl.OpenRecordConstructorResultType.computeType(OpenRecordConstructorResultType.java:70)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getTypeForFunction(AqlExpressionTypeComputer.java:80)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getType(AqlExpressionTypeComputer.java:53)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.computeOutputTypeEnvironment(AssignOperator.java:92)
> 	at org.apache.asterix.optimizer.rules.IntroduceEnforcedListTypeRule.rewritePost(IntroduceEnforcedListTypeRule.java:79)
> 	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.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:53)
> 	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:268)
> 	at org.apache.asterix.aql.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1938)
> 	at org.apache.asterix.aql.translator.QueryTranslator.handleQuery(QueryTranslator.java:2533)
> 	at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:365)
> 	at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:258)
> 	at org.apache.asterix.api.http.servlet.APIServlet.doPost(APIServlet.java:130)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:524)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
> 	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
> 	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
> 	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
> 	at java.lang.Thread.run(Thread.java:745)
> Aug 20, 2016 2:41:17 PM org.apache.asterix.api.http.servlet.APIServlet doPost
> SEVERE: null
> java.lang.NullPointerException
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:174)
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.getActualType(TypeComputeUtils.java:153)
> 	at org.apache.asterix.om.typecomputer.impl.TypeComputeUtils.resolveResultType(TypeComputeUtils.java:84)
> 	at org.apache.asterix.om.typecomputer.base.AbstractResultTypeComputer.computeType(AbstractResultTypeComputer.java:39)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getTypeForFunction(AqlExpressionTypeComputer.java:80)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getType(AqlExpressionTypeComputer.java:53)
> 	at org.apache.hyracks.algebricks.core.algebra.typing.AbstractTypeEnvironment.getType(AbstractTypeEnvironment.java:45)
> 	at org.apache.asterix.om.typecomputer.impl.OpenRecordConstructorResultType.computeType(OpenRecordConstructorResultType.java:70)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getTypeForFunction(AqlExpressionTypeComputer.java:80)
> 	at org.apache.asterix.dataflow.data.common.AqlExpressionTypeComputer.getType(AqlExpressionTypeComputer.java:53)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.computeOutputTypeEnvironment(AssignOperator.java:92)
> 	at org.apache.asterix.optimizer.rules.IntroduceEnforcedListTypeRule.rewritePost(IntroduceEnforcedListTypeRule.java:79)
> 	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.SequentialFixpointRuleController.rewriteWithRuleCollection(SequentialFixpointRuleController.java:53)
> 	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:268)
> 	at org.apache.asterix.aql.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1938)
> 	at org.apache.asterix.aql.translator.QueryTranslator.handleQuery(QueryTranslator.java:2533)
> 	at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:365)
> 	at org.apache.asterix.aql.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:258)
> 	at org.apache.asterix.api.http.servlet.APIServlet.doPost(APIServlet.java:130)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> 	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
> 	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
> 	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
> 	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
> 	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> 	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
> 	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> 	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> 	at org.eclipse.jetty.server.Server.handle(Server.java:524)
> 	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
> 	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
> 	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
> 	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
> 	at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
> 	at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
> 	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
> 	at java.lang.Thread.run(Thread.java:745)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message