Return-Path: X-Original-To: apmail-asterixdb-dev-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE4E718B1B for ; Thu, 27 Aug 2015 18:47:35 +0000 (UTC) Received: (qmail 8032 invoked by uid 500); 27 Aug 2015 18:47:35 -0000 Delivered-To: apmail-asterixdb-dev-archive@asterixdb.apache.org Received: (qmail 7978 invoked by uid 500); 27 Aug 2015 18:47:35 -0000 Mailing-List: contact dev-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list dev@asterixdb.incubator.apache.org Received: (qmail 7967 invoked by uid 99); 27 Aug 2015 18:47:35 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2015 18:47:35 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id DE9611AAEF5 for ; Thu, 27 Aug 2015 18:47:34 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.995 X-Spam-Level: X-Spam-Status: No, score=0.995 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RP_MATCHES_RCVD=-0.006, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id l30TeoJZhO_h for ; Thu, 27 Aug 2015 18:47:25 +0000 (UTC) Received: from unhygienix.ics.uci.edu (unhygienix.ics.uci.edu [128.195.14.130]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id A074621597 for ; Thu, 27 Aug 2015 18:47:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by unhygienix.ics.uci.edu (Postfix) with ESMTP id 7FE6524101B; Thu, 27 Aug 2015 11:45:27 -0700 (PDT) Date: Thu, 27 Aug 2015 11:45:27 -0700 From: "Steven Jacobs (Code Review)" Message-ID: Reply-To: sjaco002@ucr.edu X-Gerrit-MessageType: newchange Subject: Change in hyracks[master]: Adapted Inline Variable rules to allow exceptions for nonfun... X-Gerrit-Change-Id: Ib990773ec36a3f51abef72ce6ceb7715aa1d5e37 X-Gerrit-ChangeURL: X-Gerrit-Commit: 2f71075dd4630254f1763ba8def6b3750802d0e5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.8.4 To: undisclosed-recipients:; 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 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