asterixdb-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jianfeng Jia (Code Review)" <do-not-re...@asterixdb.incubator.apache.org>
Subject Change in asterixdb[master]: Print filter information in logical plan
Date Tue, 11 Apr 2017 06:19:38 GMT
Jianfeng Jia has uploaded a new change for review.

  https://asterix-gerrit.ics.uci.edu/1673

Change subject: Print filter information in logical plan
......................................................................

Print filter information in logical plan

The following commits from your working branch will be included:

commit c3b9a8d2a8b7782290743e465c8ebdb5270d1ea6
Author: Jianfeng Jia <jianfeng.jia@gmail.com>
Date:   Mon Apr 10 23:16:30 2017 -0700

    print filter information inside the logical plan

Change-Id: I8c3893fc54337695df4837e34ad7f7e89758718e
---
M hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/algebra/prettyprint/LogicalOperatorPrettyPrintVisitor.java
1 file changed, 18 insertions(+), 2 deletions(-)


  git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/73/1673/1

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..81e18c1 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 @@
 
     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));
+        printFilterInformation(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());
+        printFilterInformation(plan, op.getMinFilterVars(), op.getMaxFilterVars());
+        return null;
+    }
+
+    private Void printFilterInformation(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;
     }
 

-- 
To view, visit https://asterix-gerrit.ics.uci.edu/1673
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c3893fc54337695df4837e34ad7f7e89758718e
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Jianfeng Jia <jianfeng.jia@gmail.com>

Mime
View raw message