mbutrovich opened a new pull request, #19069: URL: https://github.com/apache/iceberg/pull/19069
Closes #19040. This removes `-NaN` from the float sort order and states that all NaN bit patterns compare equal, which is what `Float.compare` and `Double.compare` do and what the sentence after the order already claims. The rule constrains comparison only, so writers don't canonicalize the NaN values they store. It matches how the spec already treats NaN elsewhere: [expression equality](https://github.com/apache/iceberg/blob/abbb3f3588b1f1ef06bc0fa6eb05327fffdbdd32/format/expressions-spec.md?plain=1#L172), [partition value equality](https://github.com/apache/iceberg/blob/abbb3f3588b1f1ef06bc0fa6eb05327fffdbdd32/format/spec.md?plain=1#L1431), and [bucket hashing](https://github.com/apache/iceberg/blob/abbb3f3588b1f1ef06bc0fa6eb05327fffdbdd32/format/spec.md?plain=1#L2031) all treat every NaN bit pattern as one value. This is a spec-only change. Iceberg Java already sorts this way through [`Comparator.naturalOrder()`](https://github.com/apache/iceberg/blob/abbb3f3588b1f1ef06bc0fa6eb05327fffdbdd32/api/src/main/java/org/apache/iceberg/types/Comparators.java#L40-L41). # AI usage disclosure I wrote this PR description with help from Claude but understand and support the changes. I have been attending weekly syncs where this topic has come up (constraints, UDFs, etc.) and want to see this fixed. -- 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]
