zstan commented on code in PR #3335:
URL: https://github.com/apache/ignite-3/pull/3335#discussion_r1525873634


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/pruning/PartitionPruningMetadataExtractor.java:
##########
@@ -138,6 +152,177 @@ public IgniteRel visit(IgniteTableScan rel) {
         return rel;
     }
 
+    private static class ModifyNodeShuttle extends IgniteRelShuttle {
+        List<RexNode> projections = null;
+        List<List<RexNode>> expressions = null;
+        boolean unionRaised = false;
+
+        /** {@inheritDoc} */
+        @Override
+        public IgniteRel visit(IgniteProject rel) {
+            if (!unionRaised) {
+                // projection before union
+                assert projections == null;
+                // unexpected branch
+                if (projections != null) {
+                    throw Util.FoundOne.NULL;
+                }
+                projections = rel.getProjects();
+            } else {
+                // projections after union
+                if (expressions == null) {
+                    expressions = new ArrayList<>();
+                }
+                expressions.add(rel.getProjects());

Review Comment:
   i append 1 level resolver, i think it would be enough, if (for some reasons) 
no - seems we need to implement logic for input resolver like used in rules.



-- 
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]

Reply via email to