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-1581) Subquery inside case when clause - ConcurrentModificationException is thrown
Date Mon, 15 Aug 2016 17:39:21 GMT

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

Yingyi Bu reassigned ASTERIXDB-1581:
------------------------------------

    Assignee: Yingyi Bu

> Subquery inside case when clause - ConcurrentModificationException is thrown
> ----------------------------------------------------------------------------
>
>                 Key: ASTERIXDB-1581
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1581
>             Project: Apache AsterixDB
>          Issue Type: Bug
>         Environment: Master branch with latest commit id: bd3a535b171a5cc7486175
>            Reporter: Vignesh Raghunathan
>            Assignee: Yingyi Bu
>         Attachments: tpcdsadb.txt
>
>
> To reproduce the issue run the following sqlpp query after creating the types and datasets
in the attached file tpcdsadb:
> {code}
> select case when (select value count(ss)
>                   from store_sales ss
>                   where ss_quantity >= 1 and ss_quantity <= 20) > 25437
>             then (select avg(ss_ext_discount_amt)
>                   from store_sales
>                   where ss_quantity >= 1 and ss_quantity <= 20)
>             else (select avg(ss_net_profit)
>                   from store_sales
>                   where ss_quantity >= 1 and ss_quantity <= 20) end bucket1 
> from reason
> where r_reason_sk = 1;
> {code}
> Result:
> {code}
> java.util.ConcurrentModificationException
> 	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
> 	at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:640)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:183)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:126)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator.accept(AggregateOperator.java:55)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitSingleInputOperator(InlineAllNtsInSubplanVisitor.java:690)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAssignOperator(InlineAllNtsInSubplanVisitor.java:469)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAssignOperator(InlineAllNtsInSubplanVisitor.java:126)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.accept(AssignOperator.java:63)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitSingleInputOperator(InlineAllNtsInSubplanVisitor.java:690)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:635)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:183)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:126)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator.accept(AggregateOperator.java:55)
> 	at org.apache.asterix.optimizer.rules.subplan.SubplanFlatteningUtil.inlineAllNestedTupleSource(SubplanFlatteningUtil.java:67)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.applyGeneralFlattening(InlineSubplanInputForNestedTupleSourceRule.java:351)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:291)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewritePre(InlineSubplanInputForNestedTupleSourceRule.java:270)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:91)
> 	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 15, 2016 11:03:21 PM org.apache.asterix.api.http.servlet.APIServlet doPost
> SEVERE: null
> java.util.ConcurrentModificationException
> 	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
> 	at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:640)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:183)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:126)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator.accept(AggregateOperator.java:55)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitSingleInputOperator(InlineAllNtsInSubplanVisitor.java:690)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAssignOperator(InlineAllNtsInSubplanVisitor.java:469)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAssignOperator(InlineAllNtsInSubplanVisitor.java:126)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.accept(AssignOperator.java:63)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitSingleInputOperator(InlineAllNtsInSubplanVisitor.java:690)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:635)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:183)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineAllNtsInSubplanVisitor.visitAggregateOperator(InlineAllNtsInSubplanVisitor.java:126)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator.accept(AggregateOperator.java:55)
> 	at org.apache.asterix.optimizer.rules.subplan.SubplanFlatteningUtil.inlineAllNestedTupleSource(SubplanFlatteningUtil.java:67)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.applyGeneralFlattening(InlineSubplanInputForNestedTupleSourceRule.java:351)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:291)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.traverseNonSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:313)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewriteSubplanOperator(InlineSubplanInputForNestedTupleSourceRule.java:280)
> 	at org.apache.asterix.optimizer.rules.subplan.InlineSubplanInputForNestedTupleSourceRule.rewritePre(InlineSubplanInputForNestedTupleSourceRule.java:270)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.AbstractRuleController.rewriteOperatorRef(AbstractRuleController.java:91)
> 	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