asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jianf...@apache.org
Subject asterixdb git commit: Print filter information in logical plan
Date Wed, 12 Apr 2017 01:05:22 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master c07a34437 -> ed15d4603


Print filter information in logical plan

Change-Id: I8c3893fc54337695df4837e34ad7f7e89758718e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1673
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Ian Maxon <imaxon@apache.org>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


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

Branch: refs/heads/master
Commit: ed15d4603f5db329eb570335c89b1063f4e34647
Parents: c07a344
Author: Jianfeng Jia <jianfeng.jia@gmail.com>
Authored: Tue Apr 11 16:50:13 2017 -0700
Committer: Jianfeng Jia <jianfeng.jia@gmail.com>
Committed: Tue Apr 11 18:04:56 2017 -0700

----------------------------------------------------------------------
 .../LogicalOperatorPrettyPrintVisitor.java      | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ed15d460/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
----------------------------------------------------------------------
diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
index 71ac8f3..2139627 100644
--- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
+++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
@@ -313,15 +313,31 @@ public class LogicalOperatorPrettyPrintVisitor implements ILogicalOperatorVisito
 
     private Void printAbstractUnnestMapOperator(AbstractUnnestMapOperator op, Integer indent,
String opSignature)
             throws AlgebricksException {
-        addIndent(indent).append(opSignature + " " + op.getVariables() + " <- "
+        AlgebricksAppendable plan = addIndent(indent).append(opSignature + " " + op.getVariables()
+ " <- "
                 + op.getExpressionRef().getValue().accept(exprVisitor, indent));
+        appendFilterInformation(plan, op.getMinFilterVars(), op.getMaxFilterVars());
         return null;
     }
 
     @Override
     public Void visitDataScanOperator(DataSourceScanOperator op, Integer indent) throws AlgebricksException
{
-        addIndent(indent).append(
+        AlgebricksAppendable plan = addIndent(indent).append(
                 "data-scan " + op.getProjectVariables() + "<-" + op.getVariables() + "
<- " + op.getDataSource());
+        appendFilterInformation(plan, op.getMinFilterVars(), op.getMaxFilterVars());
+        return null;
+    }
+
+    private Void appendFilterInformation(AlgebricksAppendable plan, List<LogicalVariable>
minFilterVars,
+            List<LogicalVariable> maxFilterVars) throws AlgebricksException {
+        if (minFilterVars != null || maxFilterVars != null) {
+            plan.append(" with filter on");
+        }
+        if (minFilterVars != null) {
+            plan.append(" min:" + minFilterVars);
+        }
+        if (maxFilterVars != null) {
+            plan.append(" max:" + maxFilterVars);
+        }
         return null;
     }
 


Mime
View raw message