[
https://issues.jboss.org/browse/TEIID-2134?page=com.atlassian.jira.plugin...
]
Hisanobu Okuda commented on TEIID-2134:
---------------------------------------
The below would work fine.
{code}
$ diff -u
NewCalculateCostUtil.java.org NewCalculateCostUtil.java
---
NewCalculateCostUtil.java.org 2012-05-22 15:10:48.636148234 +0900
+++ NewCalculateCostUtil.java 2012-08-06 17:34:21.618124275 +0900
@@ -424,8 +424,10 @@
//set op
float[] stats = colStats.get(expr);
float[] statsOther = colStatsOther.get(outputColsOther.get(i));
+ if (stats != null && statsOther != null) {
newStats[Stat.NDV.ordinal()] = getCombinedSetEstimate(setOp,
stats[Stat.NDV.ordinal()], statsOther[Stat.NDV.ordinal()], true);
newStats[Stat.NNV.ordinal()] = getCombinedSetEstimate(setOp,
stats[Stat.NNV.ordinal()], statsOther[Stat.NNV.ordinal()],
!node.hasBooleanProperty(NodeConstants.Info.USE_ALL));
+ }
} else {
//all other cases - join is the only multi-node case here
float[] stats = null;
{code}
Select literal query causes NPE
-------------------------------
Key: TEIID-2134
URL:
https://issues.jboss.org/browse/TEIID-2134
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.4.1, 7.7
Environment: EDS 5.2.0 GA
Reporter: Hisanobu Okuda
Assignee: Steven Hawkins
Attachments: DF.vdb
I deployed the attached vdb and run the following query:-
{code}
SELECT
base.category
FROM
DF.V.BASE AS base
left outer JOIN
(
SELECT
code,
category
FROM
DF.V.TYPES) AS types
ON
types.code = base.code;
{code}
Then, it caused NPE:-
{code}
07:49:31,084 ERROR [PROCESSOR] Unexpected exception for request 7mHtpqQ7yb3J.0
java.lang.NullPointerException
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.setColStatEstimates(NewCalculateCostUtil.java:427)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.setCardinalityEstimate(NewCalculateCostUtil.java:328)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.estimateSetOpCost(NewCalculateCostUtil.java:274)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeNodeCost(NewCalculateCostUtil.java:226)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:158)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.updateCardinality(NewCalculateCostUtil.java:155)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeCostForTree(NewCalculateCostUtil.java:144)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeCostForDepJoin(NewCalculateCostUtil.java:1142)
at
org.teiid.query.optimizer.relational.rules.NewCalculateCostUtil.computeCostForDepJoin(NewCalculateCostUtil.java:1131)
at
org.teiid.query.optimizer.relational.rules.RuleChooseDependent.execute(RuleChooseDependent.java:93)
at
org.teiid.query.optimizer.relational.RelationalPlanner.executeRules(RelationalPlanner.java:463)
at
org.teiid.query.optimizer.relational.RelationalPlanner.optimize(RelationalPlanner.java:227)
at org.teiid.query.optimizer.QueryOptimizer.optimizePlan(QueryOptimizer.java:192)
at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:433)
at org.teiid.dqp.internal.process.Request.processRequest(Request.java:456)
at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:482)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:271)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:49)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:210)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:238)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:122)
at
org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:679)
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira