zstan commented on code in PR #4328:
URL: https://github.com/apache/calcite/pull/4328#discussion_r2060122543
##########
core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java:
##########
@@ -473,6 +478,117 @@ public TrimResult trimFields(
return result(newCalc, mapping, calc);
}
+ /**
+ * Shuttle that finds all references to a {@link TableScan} within a tree
+ * of {@link RelNode}s.
+ */
+ private static class InputTables extends RelHomogeneousShuttle {
+ private List<TableScan> tables = new ArrayList<>();
Review Comment:
changed.
##########
core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java:
##########
@@ -473,6 +478,117 @@ public TrimResult trimFields(
return result(newCalc, mapping, calc);
}
+ /**
+ * Shuttle that finds all references to a {@link TableScan} within a tree
+ * of {@link RelNode}s.
+ */
+ private static class InputTables extends RelHomogeneousShuttle {
+ private List<TableScan> tables = new ArrayList<>();
+
+ List<TableScan> tables() {
+ return tables;
+ }
+
+ @Override public RelNode visit(TableScan scan) {
+ tables.add(scan);
+ return super.visit(scan);
+ }
+ }
+
+ /**
+ * Shuttle that finds all references to a {@link TableScan} within current
{@link RexNode}.
Review Comment:
changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]