rubenada commented on code in PR #3193:
URL: https://github.com/apache/calcite/pull/3193#discussion_r1202549064


##########
core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java:
##########
@@ -3549,7 +3549,17 @@ protected final void createAggImpl(
     // implement HAVING (we have already checked that it is non-trivial)
     relBuilder.push(bb.root());
     if (havingExpr != null) {
-      relBuilder.filter(havingExpr);
+      /* Set the correlation variables used in this sub-query to the filter 
node,
+       * same logic is being used for the filter generated in where clause.
+       */
+      Set<CorrelationId> variableSet = new HashSet<>();

Review Comment:
   Yes, correct, `misc.iq` would fail without this code, as described on the 
other conversation. Thanks for the clarification.



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