pepijnve opened a new issue, #18626:
URL: https://github.com/apache/datafusion/issues/18626
### Describe the bug
The current implementation of `apply_operator` does not implement all
possible cases of 'and' and 'or' correctly
### To Reproduce
There are quite a few cases that are not correct. One example is
```
let t = NullableInterval::NotNull { values: Interval::CERTAINLY_TRUE };
let u = NullableInterval::Null { datatype: DataType::Boolean };
t.apply_operator(&Operator::Or, &u).unwrap();
```
In SQL `true OR NULL` evaluates to `true`, so this should return the same
value as `t`. In practice the same value as `u` is returned.
### Expected behavior
The interval arithmetic for boolean `NullableInterval` matches SQLs boolean
arithmetic.
### Additional context
_No response_
--
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]