asolimando commented on code in PR #4494:
URL: https://github.com/apache/calcite/pull/4494#discussion_r2259900702


##########
core/src/main/java/org/apache/calcite/rel/rules/IntersectToDistinctRule.java:
##########
@@ -126,12 +143,86 @@ public IntersectToDistinctRule(Class<? extends Intersect> 
intersectClass,
     call.transformTo(relBuilder.build());
   }
 
+  /**
+   * Variant performing a partial aggregation pushdown.
+   *
+   * <p>Original query:
+   * <pre>{@code
+   * SELECT job FROM "scott".emp WHERE deptno = 10
+   * INTERSECT
+   * SELECT job FROM "scott".emp WHERE deptno = 20
+   * }</pre>
+   *
+   * <p>Query after conversion:
+   * <pre>{@code
+   * SELECT job
+   * FROM (
+   *   SELECT job, SUM(c)

Review Comment:
   Good catch! I went again through all the comments and Javadoc for the 
original code and improved it to make it match the code more accurately and 
eliminating the only Hive-related nomenclature still left (`R3` as the 
relation).
   
   Note: I had to fix formatting as changing the comment made autostyle 
consider the code as changed too and there was a violation.



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