pepijnve commented on PR #17813:
URL: https://github.com/apache/datafusion/pull/17813#issuecomment-3507037577
Based on the rest of the code I've been able to find I decided to rename the
logical expression related logic to 'predicate_bounds::evaluate_bounds`. That
describes pretty accurately what this is doing. I made the return value
`NullableInterval` to fit in with similar bounds evaluating code. It's not a
pretty type imo (see the documentation I had to write to cover the possible
return values), but for better or worse that's what's already there. The nice
thing is that the call site in `expr_schema` now reads like this which is about
as self-explanatory as I can make it.
```
let bounds = predicate_bounds::evaluate_bounds(w, is_null, input_schema);
if bounds.is_certainly_not_true() {
// The branch will certainly never be taken.
// The most common pattern for this is `WHEN x IS NOT NULL THEN x`.
...
} else {
// The branch might be taken
...
}
```
--
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]