watford-ep commented on code in PR #18342:
URL: https://github.com/apache/datafusion/pull/18342#discussion_r2478151920


##########
datafusion/expr-common/src/interval_arithmetic.rs:
##########
@@ -583,7 +583,10 @@ impl Interval {
                     upper: ScalarValue::Boolean(Some(upper)),
                 })
             }
-            _ => internal_err!("Incompatible data types for logical 
conjunction"),
+            // TODO: bounds MAY be certain if either LHS or RHS is certainly 
false
+
+            // Return UNCERTAIN when intervals don't have concrete boolean 
bounds
+            _ => Ok(Self::UNCERTAIN),

Review Comment:
   I tried to find places that would be confused by this change, but there is 
quite a bit of logic around Interval and tracing the implications are a bit 
beyond me as a first time datafusion contributor. In a good way it seems 
`Interval::UNCERTAIN` is handled uniformly from what I found. There also seems 
to be test coverage in the optimizer if those TODOs were executed on 
(test_simplify_with_guarantee, test_inequalities_maybe_null, etc). 
   
   @alamb @asolimando I'm happy to explore adding those bounds here.



-- 
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]

Reply via email to