asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xikui Wang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ASTERIXDB-1623) Certain Rewrite Rule causes NPE in LogicalPlan.toString()
Date Thu, 01 Sep 2016 05:28:20 GMT

    [ https://issues.apache.org/jira/browse/ASTERIXDB-1623?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15454367#comment-15454367
] 

Xikui Wang commented on ASTERIXDB-1623:
---------------------------------------

Attached. :) 

> Certain Rewrite Rule causes NPE in LogicalPlan.toString()
> ---------------------------------------------------------
>
>                 Key: ASTERIXDB-1623
>                 URL: https://issues.apache.org/jira/browse/ASTERIXDB-1623
>             Project: Apache AsterixDB
>          Issue Type: Bug
>          Components: Optimizer
>            Reporter: Xikui Wang
>            Assignee: Yingyi Bu
>
> I met this bug when I was adding 'upsert-option' for the feed part. The easiest way to
reproduce this bug is to checkout my change at gerrit: https://asterix-gerrit.ics.uci.edu/#/c/1068/
and execute the added test case. 
> The logical plan generated by subscribe statement is: 
> from: org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java:81
> {quote}
> sink -- |UNPARTITIONED|
>   upsert into experiments:TwitterUsers from record: %0->$$2 partitioned by [%0->$$3]
out: ([record-before-upsert:null])  -- |UNPARTITIONED|
>     assign [$$3] <- [function-call: asterix:field-access-by-name, Args:[%0->$$2,
AString: {screen-name}]] -- |UNPARTITIONED|
>       project ([$$2]) -- |UNPARTITIONED|
>         assign [$$2] <- [function-call: asterix:collection-to-sequence, Args:[%0->$$0]]
-- |UNPARTITIONED|
>           unnest $$0 <- function-call: asterix:feed-collect, Args:[AString: {experiments},
AString: {UserFeed}, AString: {UserFeed}, AString: {INTAKE}, AString: {TwitterUsers}, AString:
{TwitterUserType}] -- |UNPARTITIONED|
>             empty-tuple-source -- |UNPARTITIONED|
> {quote}
> I managed to trace down that after runOptimizationSets (org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer#runOptimizationSets)
worked on ruleList "ruleList.second.get(0) instanceof PullSelectOutOfEqJoin", the plan.toString
will causes NPE. 
> In normal scenario, this exception will not appear due to the log level setting. However,
during the integration test, this bug will be triggered by 
> org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java:85
> The stack trace is as below:
> {quote}
> java.lang.NullPointerException
> 	at org.apache.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression.toString(VariableReferenceExpression.java:67)
> 	at java.lang.String.valueOf(String.java:2994)
> 	at java.lang.StringBuilder.append(StringBuilder.java:131)
> 	at org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression.toString(AbstractFunctionCallExpression.java:124)
> 	at java.lang.String.valueOf(String.java:2994)
> 	at java.lang.StringBuilder.append(StringBuilder.java:131)
> 	at org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression.toString(AbstractFunctionCallExpression.java:124)
> 	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalExpressionPrettyPrintVisitor.visitScalarFunctionCallExpression(LogicalExpressionPrettyPrintVisitor.java:57)
> 	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalExpressionPrettyPrintVisitor.visitScalarFunctionCallExpression(LogicalExpressionPrettyPrintVisitor.java:31)
> 	at org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression.accept(ScalarFunctionCallExpression.java:55)
> 	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor.pprintExprList(LogicalOperatorPrettyPrintVisitor.java:483)
> 	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor.visitAssignOperator(LogicalOperatorPrettyPrintVisitor.java:198)
> 	at org.apache.hyracks.algebricks.core.algebra.prettyprint.LogicalOperatorPrettyPrintVisitor.visitAssignOperator(LogicalOperatorPrettyPrintVisitor.java:70)
> 	at org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperator.accept(AssignOperator.java:63)
> 	at org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter.printOperator(PlanPrettyPrinter.java:47)
> 	at org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter.printOperator(PlanPrettyPrinter.java:59)
> 	at org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter.printOperator(PlanPrettyPrinter.java:59)
> 	at org.apache.hyracks.algebricks.core.algebra.prettyprint.PlanPrettyPrinter.printPlan(PlanPrettyPrinter.java:33)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.logPlanAt(HeuristicOptimizer.java:93)
> 	at org.apache.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer.optimize(HeuristicOptimizer.java:85)
> 	at org.apache.hyracks.algebricks.compiler.api.HeuristicCompilerFactoryBuilder$1$1.optimize(HeuristicCompilerFactoryBuilder.java:90)
> 	at org.apache.asterix.api.common.APIFramework.compileQuery(APIFramework.java:275)
> 	at org.apache.asterix.app.translator.QueryTranslator.rewriteCompileQuery(QueryTranslator.java:1959)
> 	at org.apache.asterix.app.translator.QueryTranslator.handleSubscribeFeedStatement(QueryTranslator.java:2406)
> 	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:358)
> 	at org.apache.asterix.app.translator.QueryTranslator.compileAndExecute(QueryTranslator.java:259)
> 	at org.apache.asterix.app.external.FeedWorkCollection$SubscribeFeedWork$SubscribeFeedWorkRunnable.run(FeedWorkCollection.java:95)
> 	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)
> {quote}



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

Mime
View raw message