asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject [84/85] [abbrv] incubator-asterixdb-hyracks git commit: Added abstract class for internal\external dataset scans.
Date Fri, 24 Apr 2015 18:46:51 GMT
Added abstract class for internal\external dataset scans.

Change-Id: I9c222ab5403a897aa3c8e6b48b6b4ad01891afbb
Reviewed-on: http://fulliautomatix.ics.uci.edu:8443/153
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Steven Jacobs <sjaco002@ucr.edu>


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

Branch: refs/heads/master
Commit: 38dea13e99ed602be3e4b9fa691cca55c4375270
Parents: 81b1501
Author: Ildar Absalyamov <ildar.absalyamov@gmail.com>
Authored: Thu Mar 19 11:40:58 2015 -0700
Committer: Ian Maxon <imaxon@uci.edu>
Committed: Fri Mar 20 11:01:15 2015 -0700

----------------------------------------------------------------------
 .../logical/AbstractDataSourceOperator.java     | 20 ++++++++++++++++++++
 .../logical/DataSourceScanOperator.java         | 11 ++---------
 .../logical/ExternalDataLookupOperator.java     |  7 ++++---
 .../visitors/OperatorDeepCopyVisitor.java       |  2 +-
 4 files changed, 27 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/38dea13e/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/AbstractDataSourceOperator.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/AbstractDataSourceOperator.java
b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/AbstractDataSourceOperator.java
new file mode 100644
index 0000000..a265dcc
--- /dev/null
+++ b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/AbstractDataSourceOperator.java
@@ -0,0 +1,20 @@
+package edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical;
+
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalVariable;
+import edu.uci.ics.hyracks.algebricks.core.algebra.metadata.IDataSource;
+import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractScanOperator;
+
+import java.util.List;
+
+public abstract class AbstractDataSourceOperator extends AbstractScanOperator {
+    protected IDataSource<?> dataSource;
+
+    public AbstractDataSourceOperator(List<LogicalVariable> variables, IDataSource<?>
dataSource) {
+        super(variables);
+        this.dataSource = dataSource;
+    }
+
+    public IDataSource<?> getDataSource() {
+        return dataSource;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/38dea13e/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/DataSourceScanOperator.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/DataSourceScanOperator.java
b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/DataSourceScanOperator.java
index ba51f04..ff21478 100644
--- a/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/DataSourceScanOperator.java
+++ b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/DataSourceScanOperator.java
@@ -31,9 +31,7 @@ import edu.uci.ics.hyracks.algebricks.core.algebra.typing.ITypingContext;
 import edu.uci.ics.hyracks.algebricks.core.algebra.visitors.ILogicalExpressionReferenceTransform;
 import edu.uci.ics.hyracks.algebricks.core.algebra.visitors.ILogicalOperatorVisitor;
 
-public class DataSourceScanOperator extends AbstractScanOperator {
-    private IDataSource<?> dataSource;
-
+public class DataSourceScanOperator extends AbstractDataSourceOperator {
     private List<LogicalVariable> projectVars;
 
     private boolean projectPushed = false;
@@ -43,8 +41,7 @@ public class DataSourceScanOperator extends AbstractScanOperator {
     private List<LogicalVariable> maxFilterVars;
 
     public DataSourceScanOperator(List<LogicalVariable> variables, IDataSource<?>
dataSource) {
-        super(variables);
-        this.dataSource = dataSource;
+        super(variables, dataSource);
         projectVars = new ArrayList<LogicalVariable>();
     }
 
@@ -53,10 +50,6 @@ public class DataSourceScanOperator extends AbstractScanOperator {
         return LogicalOperatorTag.DATASOURCESCAN;
     }
 
-    public IDataSource<?> getDataSource() {
-        return dataSource;
-    }
-
     @Override
     public <R, S> R accept(ILogicalOperatorVisitor<R, S> visitor, S arg) throws
AlgebricksException {
         return visitor.visitDataScanOperator(this, arg);

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/38dea13e/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/ExternalDataLookupOperator.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/ExternalDataLookupOperator.java
b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/ExternalDataLookupOperator.java
index e18c461..4737cfc 100644
--- a/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/ExternalDataLookupOperator.java
+++ b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/ExternalDataLookupOperator.java
@@ -17,6 +17,7 @@ package edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical;
 import java.util.ArrayList;
 import java.util.List;
 
+import edu.uci.ics.hyracks.algebricks.core.algebra.metadata.IDataSource;
 import org.apache.commons.lang3.mutable.Mutable;
 
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -31,15 +32,15 @@ import edu.uci.ics.hyracks.algebricks.core.algebra.typing.NonPropagatingTypeEnvi
 import edu.uci.ics.hyracks.algebricks.core.algebra.visitors.ILogicalExpressionReferenceTransform;
 import edu.uci.ics.hyracks.algebricks.core.algebra.visitors.ILogicalOperatorVisitor;
 
-public class ExternalDataLookupOperator extends AbstractScanOperator {
+public class ExternalDataLookupOperator extends AbstractDataSourceOperator {
 
     private final List<Object> variableTypes;
     protected final Mutable<ILogicalExpression> expression;
     private final boolean propagateInput;
 
     public ExternalDataLookupOperator(List<LogicalVariable> variables, Mutable<ILogicalExpression>
expression,
-            List<Object> variableTypes, boolean propagateInput) {
-        super(variables);
+            List<Object> variableTypes, boolean propagateInput, IDataSource<?>
dataSource) {
+        super(variables, dataSource);
         this.expression = expression;
         this.variableTypes = variableTypes;
         this.propagateInput = propagateInput;

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb-hyracks/blob/38dea13e/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/visitors/OperatorDeepCopyVisitor.java
----------------------------------------------------------------------
diff --git a/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/visitors/OperatorDeepCopyVisitor.java
b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/visitors/OperatorDeepCopyVisitor.java
index ebb195f..e62dbf8 100644
--- a/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/visitors/OperatorDeepCopyVisitor.java
+++ b/algebricks/algebricks-core/src/main/java/edu/uci/ics/hyracks/algebricks/core/algebra/operators/logical/visitors/OperatorDeepCopyVisitor.java
@@ -358,7 +358,7 @@ public class OperatorDeepCopyVisitor implements ILogicalOperatorVisitor<ILogical
         ArrayList<LogicalVariable> newInputList = new ArrayList<LogicalVariable>();
         newInputList.addAll(op.getVariables());
         return new ExternalDataLookupOperator(newInputList, deepCopyExpressionRef(op.getExpressionRef()),
-                new ArrayList<Object>(op.getVariableTypes()), op.isPropagateInput());
+                new ArrayList<Object>(op.getVariableTypes()), op.isPropagateInput(),
op.getDataSource());
     }
 
     @Override


Mime
View raw message