You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by sj...@apache.org on 2018/07/10 00:49:23 UTC

asterixdb git commit: [ASTERIXDB-2405][COMP] Allow IntroduceJoin to start at delegates

Repository: asterixdb
Updated Branches:
  refs/heads/master 73d39236a -> e93617f8a


[ASTERIXDB-2405][COMP] Allow IntroduceJoin to start at delegates

- user model changes: no
- storage format changes: no
- interface changes: no

details:
Previously, IntroduceJoinAccessMethodRule would only start at
the top of a plan (commit or distribute result)
Commit is the only delegate operator in master.
We have one more delegate operator in BAD, which is also the
top of the plan.
This change allows all delegates to be considered by
IntroduceJoinAccessMethodRule as a starting point.

Change-Id: I00172958df8c9ce6dc4cc6b405bc1d6665e2d514
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2740
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
Contrib: Jenkins <je...@fulliautomatix.ics.uci.edu>
Reviewed-by: Xikui Wang <xk...@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/e93617f8
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/e93617f8
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/e93617f8

Branch: refs/heads/master
Commit: e93617f8a73abf46a25b94e7f9d7af441f167698
Parents: 73d3923
Author: Steven Glenn Jacobs <sj...@ucr.edu>
Authored: Mon Jul 9 11:36:38 2018 -0700
Committer: Steven Jacobs <sj...@ucr.edu>
Committed: Mon Jul 9 17:49:00 2018 -0700

----------------------------------------------------------------------
 .../optimizer/rules/am/IntroduceJoinAccessMethodRule.java     | 7 -------
 1 file changed, 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/e93617f8/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceJoinAccessMethodRule.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceJoinAccessMethodRule.java b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceJoinAccessMethodRule.java
index 401ea23..bc73199 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceJoinAccessMethodRule.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/am/IntroduceJoinAccessMethodRule.java
@@ -24,7 +24,6 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.asterix.algebra.operators.CommitOperator;
 import org.apache.asterix.metadata.entities.Dataset;
 import org.apache.asterix.metadata.entities.Index;
 import org.apache.commons.lang3.mutable.Mutable;
@@ -41,7 +40,6 @@ import org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCall
 import org.apache.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractBinaryJoinOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.DelegateOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.GroupByOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.InnerJoinOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.LeftOuterJoinOperator;
@@ -127,11 +125,6 @@ public class IntroduceJoinAccessMethodRule extends AbstractIntroduceAccessMethod
             return false;
         }
 
-        if (op.getOperatorTag() == LogicalOperatorTag.DELEGATE_OPERATOR
-                && !(((DelegateOperator) op).getDelegate() instanceof CommitOperator)) {
-            return false;
-        }
-
         afterJoinRefs = new ArrayList<>();
         // Recursively checks the given plan whether the desired pattern exists in it.
         // If so, try to optimize the plan.