Author: jolee
Date: 2012-07-09 10:31:47 -0400 (Mon, 09 Jul 2012)
New Revision: 4226
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java
Log:
TEIID-2093: MAKEDEP causes AssertionError (backport for 7.4.x)
Modified:
branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java
===================================================================
---
branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2012-07-08
20:12:37 UTC (rev 4225)
+++
branches/7.4.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RulePushSelectCriteria.java 2012-07-09
14:31:47 UTC (rev 4226)
@@ -40,6 +40,7 @@
import org.teiid.query.optimizer.relational.OptimizerRule;
import org.teiid.query.optimizer.relational.RuleStack;
import org.teiid.query.optimizer.relational.plantree.NodeConstants;
+import org.teiid.query.optimizer.relational.plantree.NodeConstants.Info;
import org.teiid.query.optimizer.relational.plantree.NodeEditor;
import org.teiid.query.optimizer.relational.plantree.NodeFactory;
import org.teiid.query.optimizer.relational.plantree.PlanNode;
@@ -113,7 +114,7 @@
boolean moved = false;
- if((critNode.getGroups().isEmpty() &&
critNode.getSubqueryContainers().isEmpty()) || !atBoundary(critNode, sourceNode)) {
+ if(critNode.hasBooleanProperty(Info.IS_PUSHED) ||
(critNode.getGroups().isEmpty() && critNode.getSubqueryContainers().isEmpty()) ||
!atBoundary(critNode, sourceNode)) {
deadNodes.add(critNode);
continue;
}
Modified:
branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java
===================================================================
---
branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java 2012-07-08
20:12:37 UTC (rev 4225)
+++
branches/7.4.x/engine/src/test/java/org/teiid/query/optimizer/TestOptimizer.java 2012-07-09
14:31:47 UTC (rev 4226)
@@ -6286,7 +6286,7 @@
String sql = "select a.e1 from (select 1 e1) a, (select e1, 1 as a, x from
(select e1, CASE WHEN e1 = 'a' THEN e2 ELSE e3 END as x from pm1.g2) y group by
e1, x) b where a.e1 = b.x"; //$NON-NLS-1$
ProcessorPlan plan = helpPlan(sql, metadata, null, capFinder,
- new String[] {"SELECT v_1.c_0 FROM (SELECT
v_0.c_1 AS c_0 FROM (SELECT g_0.e1 AS c_0, CASE WHEN g_0.e1 = 'a' THEN g_0.e2 ELSE
g_0.e3 END AS c_1 FROM pm1.g2 AS g_0 WHERE CASE WHEN g_0.e1 = 'a' THEN g_0.e2 ELSE
g_0.e3 END IN (<dependent values>)) AS v_0 GROUP BY v_0.c_0, v_0.c_1) AS v_1 ORDER
BY c_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
+ new String[] {"SELECT v_1.c_0 FROM (SELECT v_0.c_1 AS c_0 FROM (SELECT
g_0.e1 AS c_0, CASE WHEN g_0.e1 = 'a' THEN g_0.e2 ELSE g_0.e3 END AS c_1 FROM
pm1.g2 AS g_0) AS v_0 GROUP BY v_0.c_0, v_0.c_1) AS v_1 WHERE v_1.c_0 IN (<dependent
values>) ORDER BY c_0"}, ComparisonMode.EXACT_COMMAND_STRING); //$NON-NLS-1$
checkNodeTypes(plan, new int[] {
0, // Access
Show replies by date