asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjaco...@apache.org
Subject incubator-asterixdb git commit: ASTERIXDB-1359 Removed Project from IntroduceSecondaryIndex Rule
Date Tue, 22 Mar 2016 19:38:10 GMT
Repository: incubator-asterixdb
Updated Branches:
  refs/heads/master 30904b839 -> 33db5af99


ASTERIXDB-1359 Removed Project from IntroduceSecondaryIndex Rule

Change-Id: I912e3d56c0b9c2b5b252630acf8b15c54e0f61a1
Reviewed-on: https://asterix-gerrit.ics.uci.edu/742
Reviewed-by: Ildar Absalyamov <ildar.absalyamov@gmail.com>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>


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

Branch: refs/heads/master
Commit: 33db5af993c3838fcf76c81d7e35c81abd145728
Parents: 30904b8
Author: Steven Jacobs <sjaco002@ucr.edu>
Authored: Tue Mar 22 11:58:38 2016 -0700
Committer: Steven Jacobs <sjaco002@ucr.edu>
Committed: Tue Mar 22 12:32:48 2016 -0700

----------------------------------------------------------------------
 ...IntroduceSecondaryIndexInsertDeleteRule.java | 20 --------------------
 .../results/disjunction-to-join-delete-3.plan   |  6 +++---
 2 files changed, 3 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/33db5af9/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java
----------------------------------------------------------------------
diff --git a/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java
b/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java
index 8cc18ba..8487374 100644
--- a/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java
+++ b/asterix-algebra/src/main/java/org/apache/asterix/optimizer/rules/IntroduceSecondaryIndexInsertDeleteRule.java
@@ -21,10 +21,8 @@ package org.apache.asterix.optimizer.rules;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
-import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.List;
-import java.util.Set;
 import java.util.Stack;
 
 import org.apache.asterix.common.config.DatasetConfig.DatasetType;
@@ -75,10 +73,8 @@ import org.apache.hyracks.algebricks.core.algebra.operators.logical.AssignOperat
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.IndexInsertDeleteUpsertOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.InsertDeleteUpsertOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.InsertDeleteUpsertOperator.Kind;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.ProjectOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.ReplicateOperator;
 import org.apache.hyracks.algebricks.core.algebra.operators.logical.TokenizeOperator;
-import org.apache.hyracks.algebricks.core.algebra.operators.logical.visitors.VariableUtilities;
 import org.apache.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
 
 public class IntroduceSecondaryIndexInsertDeleteRule implements IAlgebraicRewriteRule {
@@ -260,22 +256,6 @@ public class IntroduceSecondaryIndexInsertDeleteRule implements IAlgebraicRewrit
                 throw new AlgebricksException(e);
             }
         }
-        Set<LogicalVariable> projectVars = new HashSet<LogicalVariable>();
-        VariableUtilities.getUsedVariables(op1, projectVars);
-        if (enforcedRecordVar != null) {
-            projectVars.add(enforcedRecordVar);
-        }
-        if (insertOp.getOperation() == Kind.UPSERT) {
-            projectVars.add(insertOp.getPrevRecordVar());
-            if (filteringFields != null) {
-                // project prev filter value
-                projectVars.add(insertOp.getPrevFilterVar());
-            }
-        }
-        ProjectOperator project = new ProjectOperator(new ArrayList<LogicalVariable>(projectVars));
-        project.getInputs().add(new MutableObject<ILogicalOperator>(currentTop));
-        context.computeAndSetTypeEnvironmentForOperator(project);
-        currentTop = project;
 
         // Replicate Operator is applied only when doing the bulk-load.
         AbstractLogicalOperator replicateOp = null;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/33db5af9/asterix-app/src/test/resources/optimizerts/results/disjunction-to-join-delete-3.plan
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/optimizerts/results/disjunction-to-join-delete-3.plan
b/asterix-app/src/test/resources/optimizerts/results/disjunction-to-join-delete-3.plan
index bca0381..7d38039 100644
--- a/asterix-app/src/test/resources/optimizerts/results/disjunction-to-join-delete-3.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/disjunction-to-join-delete-3.plan
@@ -9,7 +9,7 @@
                 -- INSERT_DELETE  |PARTITIONED|
                   -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                     -- MATERIALIZE  |PARTITIONED|
-                      -- HASH_PARTITION_EXCHANGE [$$8]  |PARTITIONED|
+                      -- HASH_PARTITION_EXCHANGE [$$10]  |PARTITIONED|
                         -- ASSIGN  |PARTITIONED|
                           -- STREAM_PROJECT  |PARTITIONED|
                             -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
@@ -18,8 +18,8 @@
                                   -- UNNEST  |UNPARTITIONED|
                                     -- EMPTY_TUPLE_SOURCE  |UNPARTITIONED|
                                 -- HASH_PARTITION_EXCHANGE [$$9]  |PARTITIONED|
-                                  -- ASSIGN  |PARTITIONED|
-                                    -- STREAM_PROJECT  |PARTITIONED|
+                                  -- STREAM_PROJECT  |PARTITIONED|
+                                    -- ASSIGN  |PARTITIONED|
                                       -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
                                         -- DATASOURCE_SCAN  |PARTITIONED|
                                           -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|


Mime
View raw message