Jianfeng Jia has submitted this change and it was merged.

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


Print filter information in logical plan

Change-Id: I8c3893fc54337695df4837e34ad7f7e89758718e
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1673
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Reviewed-by: Yingyi Bu <[email protected]>
BAD: Jenkins <[email protected]>
Reviewed-by: Ian Maxon <[email protected]>
Integration-Tests: Jenkins <[email protected]>
---
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(-)

Approvals:
  Yingyi Bu: Looks good to me, approved
  Ian Maxon: Looks good to me, but someone else must approve
  Jenkins: Verified; No violations found; No violations found; Verified



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 @@
 
     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;
     }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c3893fc54337695df4837e34ad7f7e89758718e
Gerrit-PatchSet: 4
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Jianfeng Jia <[email protected]>
Gerrit-Reviewer: Ian Maxon <[email protected]>
Gerrit-Reviewer: Jenkins <[email protected]>
Gerrit-Reviewer: Jianfeng Jia <[email protected]>
Gerrit-Reviewer: Yingyi Bu <[email protected]>

Reply via email to