Nathan-Fenner opened a new issue, #1355:
URL: https://github.com/apache/iceberg-rust/issues/1355

   ### Apache Iceberg Rust version
   
   0.4.0 (latest version)
   
   ### Describe the bug
   
   Consider the following example table partition file:
   
   | `id`  | `count` |
   | ------------- | ------------- |
   | "a"  | 3  |
   | "b"  | 2  |
   | "c"  | 5  |
   | "d"  | 7  |
   | "e"  | 5  |
   
   This partition file will have statistics:
   
   | statistic  | column | value |
   | ------------- | ------------- | --- |
   | lower_bound  | `count` | 2 |
   | upper_bound  | `count` | 7 |
   
   If I perform a query with predicate `count >= 5`, this partition must be 
included.
   
   If I perform a query with predicate `not(count >= 5)`, this partition *must 
still be included*.
   
   The logic in 
[manifest_evaluator.rs](https://github.com/apache/iceberg-rust/blob/50de31a5ef7518aeefad88ed9d815cd24ca962b8/crates/iceberg/src/expr/visitors/manifest_evaluator.rs#L70)
 is currently 2-values, with options `ROWS_MIGHT_MATCH` and 
`ROWS_CANNOT_MATCH`. But then the only correct behavior for `not` would be
   
   ```rs
       fn not(&mut self, inner: bool) -> crate::Result<bool> {
         ROWS_MIGHT_MATCH
       }
   ```
   
   The tests need to be expanded in order to catch this logical error, and a 
3-value logic with (`MUST_MATCH`, `MIGHT_MATCH`, `CANNOT_MATCH`) values 
probably needs to be adopted to correctly handle all of these cases.
   
   ### To Reproduce
   
   _No response_
   
   ### Expected behavior
   
   _No response_
   
   ### Willingness to contribute
   
   I cannot contribute a fix for this bug at this time


-- 
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: issues-unsubscr...@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to