crepererum commented on code in PR #13293:
URL: https://github.com/apache/datafusion/pull/13293#discussion_r1834173817
##########
datafusion/common/src/stats.rs:
##########
@@ -31,6 +31,14 @@ pub enum Precision<T: Debug + Clone + PartialEq + Eq +
PartialOrd> {
Exact(T),
/// The value is not known exactly, but is likely close to this value
Inexact(T),
+ /// The value is know to be at most (inclusive) of this value.
+ ///
+ /// The actual value may be smaller, but it is never greater.
+ AtMost(T),
Review Comment:
I wonder if a range semantics would be nicer, i.e.:
```rust
struct Precision {
lower: Option<T>,
upper: Option<T>,
}
```
And then you have:
| Big Enum | Lower | Upper |
| --------- | --------- | --------- |
| `Exact` | `Some(x)` | `Some(x)` |
| `Inexact` | -- | -- |
| `AtMost` | `None` | `Some(x)` |
| `AtLeast` | `Some(x)` | `None` |
| `Absent` | `None` | `None` |
| -- | `Some(x)` | `Some(y)` |
--
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]