rubenada commented on code in PR #3193: URL: https://github.com/apache/calcite/pull/3193#discussion_r1202428792
########## 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: Would it possible to have some new test(s) in `SqlToRelConverterTest.java` showing the problem that this piece of code fixes? -- 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: commits-unsubscr...@calcite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org