Lordworms commented on code in PR #11897: URL: https://github.com/apache/datafusion/pull/11897#discussion_r1712386279
########## datafusion/sql/src/select.rs: ########## @@ -778,9 +777,12 @@ impl<'a, S: ContextProvider> SqlToRel<'a, S> { // Rewrite the HAVING expression to use the columns produced by the // aggregation. let having_expr_post_aggr = if let Some(having_expr) = having_expr_opt { - let having_expr_post_aggr = - rebase_expr(having_expr, &aggr_projection_exprs, input)?; - + let having_expr_post_aggr = match having_expr { Review Comment: I think it has nothing to do with it. The reason for this bug is `having_expr_post_aggr` wrongly transformed into a column instead of a boolean value. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org