alamb commented on issue #17801:
URL: https://github.com/apache/datafusion/issues/17801#issuecomment-3499059273

   How about this for a (very hacky) solution until we sort out the real one:
   1. Add a new field to 
[`Case`](https://github.com/apache/datafusion/blob/e4f6a144ac652f3eac4fe3dfebe3649c32fb19de/datafusion/expr/src/expr.rs#L672-L671)
 to pass along the "we know it is nullable" flag:
   
   ```rust
   pub struct Case {
       pub expr: Option<Box<Expr>>,
       pub when_then_expr: Vec<(Box<Expr>, Box<Expr>)>,
       pub else_expr: Option<Box<Expr>>,
       /// ** NEW FIELD **
       /// If this expression is known to be non-nullable (e.g. it came from
       /// simplifying a `IFNULL` expression)
       pub known_non_nullable: bool,
   }
   ```


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to