commit | cec8edf9af0669f102ae8482b20a93c9b5ebe520 | [log] [tgz] |
---|---|---|
author | zheilbron <zheilbron@gmail.com> | Thu Oct 17 10:18:12 2013 -0700 |
committer | zheilbron <zheilbron@gmail.com> | Thu Oct 17 10:18:12 2013 -0700 |
tree | 40af2d4eb7071468de17eb60ffc673143356c404 | |
parent | 4c0246ef62ed85b5e4a3d42722578ac4d173448a [diff] |
disable common subexpression elimination for non-functional functions
diff --git a/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/ExtractCommonExpressionsRule.java b/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/ExtractCommonExpressionsRule.java index 9e0d8d0..eafb3b0 100644 --- a/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/ExtractCommonExpressionsRule.java +++ b/algebricks/algebricks-rewriter/src/main/java/edu/uci/ics/hyracks/algebricks/rewriter/rules/ExtractCommonExpressionsRule.java
@@ -251,7 +251,7 @@ return true; } } else { - if (assignCommonExpression(exprEqClass, expr)) { + if (expr.isFunctional() && assignCommonExpression(exprEqClass, expr)) { //re-obtain the live vars after rewriting in the method called in the if condition Set<LogicalVariable> liveVars = new HashSet<LogicalVariable>(); VariableUtilities.getLiveVariables(op, liveVars);