ozankabak commented on PR #5180:
URL: https://github.com/apache/arrow-rs/pull/5180#issuecomment-1845464543

   > Currently the following is always true regardless of input
   
   This will indeed be false with the proposed semantics. I understand that you 
want to preserve such invariants, even though I'd say it's arguable users would 
want such an invariant if the underlying datatype doesn't really admit it with 
its natural ordering semantics. The price to pay (unnatural comparisons) is 
quite heavy.
   
   There is unfortunately no perfect solution here, the interval data type is 
too weird 🙁 
   
   > Whilst I agree the ordering is surprising, and may violate people's 
expectations, but this is general problem for intervals where even basic 
arithmetic axioms don't hold, e.g. a + b - a == b.
   
   Such basic arithmetic axioms do not hold for floating point values either 
but they still have sensible ordering semantics (comparisons coincide with 
their natural meaning for non-NaN cases, indeterminate comparisons involving 
NaNs return false all ways). So if you are pointing out yet another weirdness 
with the interval type, I agree with you -- but these points are not really 
logically related or support/normalize each other.
   
   Let's fix this in Datafusion in the short term and we can revisit an 
upstream solution later on when we have more clarity. Maybe you or us will have 
even better ideas/semantics over 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to