sdf-jkl commented on PR #20051: URL: https://github.com/apache/datafusion/pull/20051#issuecomment-3824558758
If we pass a `Null` literal in `get_preimage` as is, it will not return `PreimageResult::Range` and the whole simplification will be aborted. I was thinking about checking if `any(is_null)` and storing it. When `true`, we would add `expr.is_null()` or` expr.is_not_null()` to the resulting expression. It will be based on the `negate` boolean(false => is_null(), true => is_not_null()). When looping through the expressions in the list we would check if `expr.is_null()`, and if it is `continue`, else `get_preimage(expr)`. But I don't think this is relevant because if you want `distinct` behavior, you should chain `is_(not_)distinct_from` expressions instead of using `InList`. -- 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]
