zabetak commented on a change in pull request #2623:
URL: https://github.com/apache/calcite/pull/2623#discussion_r764843257



##########
File path: core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java
##########
@@ -4346,7 +4336,21 @@ private void convertSelectList(
 
     relBuilder.push(bb.root())
         .projectNamed(exprs, fieldNames, true);
-    bb.setRoot(relBuilder.build(), false);
+
+    RelNode project = relBuilder.build();
+
+    final RelNode r;
+    final CorrelationUse p = getCorrelationUse(bb, project);
+    if (p != null) {
+      assert p.r instanceof Project;
+      Project proj = (Project) p.r;
+      r = LogicalProject.create(proj.getInput(), proj.getHints(),

Review comment:
       The class allows somebody to pass their own customized `RelBuilder` 
which can create a `HiveProject` instead of `LogicalProject`. In various places 
the `SqlToRelConverter` creates explicitly `Logical` expressions instead 
passing via the `relBuilder` which currently makes the `RelBuilder` 
customization kind of useless but this may change in the near future.




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