Steven Jacobs has uploaded a new change for review. https://asterix-gerrit.ics.uci.edu/368
Change subject: Adapted Inline Variable rules to allow exceptions for nonfunctional functions. Exceptions must be implemented by an inherited class. ...................................................................... Adapted Inline Variable rules to allow exceptions for nonfunctional functions. Exceptions must be implemented by an inherited class. Change-Id: Ib990773ec36a3f51abef72ce6ceb7715aa1d5e37 --- M algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/InlineVariablesRule.java 1 file changed, 6 insertions(+), 2 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/hyracks refs/changes/68/368/1 diff --git a/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/InlineVariablesRule.java b/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/InlineVariablesRule.java index eeffe1c..35bd40f 100644 --- a/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/InlineVariablesRule.java +++ b/algebricks/algebricks-rewriter/src/main/java/org/apache/hyracks/algebricks/rewriter/rules/InlineVariablesRule.java @@ -22,7 +22,6 @@ import java.util.Set; import org.apache.commons.lang3.mutable.Mutable; - import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException; import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression; import org.apache.hyracks.algebricks.core.algebra.base.ILogicalOperator; @@ -116,6 +115,10 @@ return false; } + protected boolean createException(ILogicalExpression expr) { + return false; + } + protected boolean inlineVariables(Mutable<ILogicalOperator> opRef, IOptimizationContext context) throws AlgebricksException { AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue(); @@ -130,7 +133,8 @@ // Ignore functions that are either in the doNotInline set or are non-functional if (expr.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) { AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expr; - if (doNotInlineFuncs.contains(funcExpr.getFunctionIdentifier()) || !funcExpr.isFunctional()) { + if (doNotInlineFuncs.contains(funcExpr.getFunctionIdentifier()) + || (!funcExpr.isFunctional() && !createException(expr))) { continue; } } -- To view, visit https://asterix-gerrit.ics.uci.edu/368 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib990773ec36a3f51abef72ce6ceb7715aa1d5e37 Gerrit-PatchSet: 1 Gerrit-Project: hyracks Gerrit-Branch: master Gerrit-Owner: Steven Jacobs <sjaco...@ucr.edu>