Author: shawkins
Date: 2012-05-13 23:45:48 -0400 (Sun, 13 May 2012)
New Revision: 4098
Modified:
branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCleanCriteria.java
branches/7.7.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java
Log:
TEIID-2041 correctly adding ruleraisenull
Modified:
branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCleanCriteria.java
===================================================================
---
branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCleanCriteria.java 2012-05-10
19:03:30 UTC (rev 4097)
+++
branches/7.7.x/engine/src/main/java/org/teiid/query/optimizer/relational/rules/RuleCleanCriteria.java 2012-05-14
03:45:48 UTC (rev 4098)
@@ -71,7 +71,7 @@
pushRaiseNull |= clean(node);
}
if (plan.getType() == NodeConstants.Types.SELECT) {
- pushRaiseNull = cleanCriteria(plan);
+ pushRaiseNull |= cleanCriteria(plan);
}
return pushRaiseNull;
}
Modified:
branches/7.7.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java
===================================================================
---
branches/7.7.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java 2012-05-10
19:03:30 UTC (rev 4097)
+++
branches/7.7.x/engine/src/test/java/org/teiid/query/optimizer/TestRuleRaiseNull.java 2012-05-14
03:45:48 UTC (rev 4098)
@@ -339,6 +339,12 @@
TestOptimizer.checkNodeTypes(plan, FULLY_NULL);
}
+ @Test public void testCleanCriteria() {
+ ProcessorPlan plan = TestOptimizer.helpPlan("select * from (Select
'x' as c from pm1.g1, pm2.g1 where pm1.g1.e1 = 'a') y where c =
'y'", TestOptimizer.example1(), //$NON-NLS-1$
+ new String[] { });
+ TestOptimizer.checkNodeTypes(plan, FULLY_NULL);
+ }
+
@Test public void testRaiseNullWithUnionNotAll() {
String sql = "select intkey from bqt2.smalla union select intkey from
bqt2.smalla where 1 = 0"; //$NON-NLS-1$
Show replies by date