Xikui Wang created ASTERIXDB-1623:
-------------------------------------
Summary: Certain Rewritten 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
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 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
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)