Lordworms commented on code in PR #11897: URL: https://github.com/apache/datafusion/pull/11897#discussion_r1712385483
########## 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 { + Expr::Literal(ScalarValue::Boolean(Some(false))) => { + having_expr.to_owned() Review Comment: Yes, I can fix other test coverage -- 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