alamb commented on code in PR #11897:
URL: https://github.com/apache/datafusion/pull/11897#discussion_r1711601723


##########
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 wonder if this is common enough to add it as a function in `Expr` 
   
   like 
   
   ```rust
   impl Expr {
     /// return true if this expression is the boolean literal `true`
     pub fn is_true(&self) -> bool { ... }
     /// return true if this expression is the boolean literal `false`
     ...
     /// return true if this expression is the boolean literal `null`
     ...
   }
   ```
   
   (as a follow on PR of course 🤔 )



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

Reply via email to