yyanyy commented on code in PR #18416:
URL: https://github.com/apache/iceberg/pull/18416#discussion_r4688844799


##########
format/spec.md:
##########
@@ -729,6 +749,8 @@ Order id `0` is reserved for the unsorted order.
 
 Sorting floating-point numbers should produce the following behavior: `-NaN` < 
`-Infinity` < `-value` < `-0` < `0` < `value` < `Infinity` < `NaN`. This aligns 
with the implementation of Java floating-point types comparisons.
 
+Vector values of the same `vector(E, D)` type must be sorted lexicographically 
using the [comparison rules](expressions-spec.md#comparisons) of E's value type.

Review Comment:
   I have been going back and forth on this because lexicographic ordering is 
straightforward to define (and my agent told me "lexicographic" applies to 
numbers too :) ) , and vectors are already excluded from partition and sort 
keys. However, the recent index sync discussion highlighted inconsistency for 
sorting/expression comparison with floating points particularly around signed 
zero, so maybe it's not worth complicating the story for vector, especially 
that we don't currently have a concrete use case for ordered vector 
comparisons. Updated the spec to reflect this. 
   
   



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