[
https://issues.jboss.org/browse/TEIID-2220?page=com.atlassian.jira.plugin...
]
Steven Hawkins resolved TEIID-2220.
-----------------------------------
Resolution: Done
Addressed by refining the RulePlanAggregates logic that deals with expression filtering
for both equi-joins and grouping expressions.
An example query affecting a join predicate:
SELECT count(t2.e4) as s FROM pm1.g1 as t1, pm1.g2 as t2, pm1.g3 as t3 WHERE t1.e1 = t2.e1
and t2.e2 = t3.e2 and t1.e3 || t2.e3 = t3.e3
It was also noticed that grouping expressions that were broader than the target aggregate
push point had an issue as well. An example query affecting a group by expression:
SELECT count(t2.e4) as s, t1.e3 || t2.e3 FROM pm1.g1 as t1, pm1.g2 as t2, pm1.g3 as t3
WHERE t1.e1 = t2.e1 and t2.e2 = t3.e2 GROUP BY t1.e3 || t2.e3
Invalid aggregate pushing
-------------------------
Key: TEIID-2220
URL:
https://issues.jboss.org/browse/TEIID-2220
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 7.7
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 8.2
When a grouping is performed over a 3 way or higher join and aggregation appears to be
eligible to be pushed to a leaf join, but a higher level join contains equi-join criteria
where the side in the path of push aggregate target uses a join expression that spans a
table not in the aggregate target, then an exception will be thrown during processing that
the outside expression value cannot be found.
For example:
TEIID30328 Unable to evaluate t2.e3: No value was available
at org.teiid.query.util.CommandContext.getFromContext(CommandContext.java:430)
at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:617)
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:1021)
at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:622)
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:1021)
at org.teiid.query.eval.Evaluator.internalEvaluate(Evaluator.java:622)
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:592)
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:270)
at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:210)
at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:199)
at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:312)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira