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