zhangfengcdt opened a new pull request, #3327:
URL: https://github.com/apache/iceberg-rust/pull/3327

   ## Which issue does this PR close?
   
   - Closes #3325.
   
   ## What changes are included in this PR?
   
   `PrimitiveLiteral` derived its equality from `OrderedFloat`, which treats 
`-0.0` and `0.0` as equal. Partition tuples are keyed on it, so `FanoutWriter`, 
`ClusteredWriter`, `RecordBatchPartitionSplitter` and the delete file index all 
merged the two partitions. iceberg-java keeps them apart.
   
   This gives `PrimitiveLiteral` hand-written `PartialEq` / `PartialOrd` that 
follow Java's `Float.compare` / `Double.compare`: `-0.0 < 0.0`, and all NaNs 
are equal. `Hash` stays derived; it hashes both zeros alike, which is still 
valid.
   
   Two things worth a look in review:
   
   - `=` and `IN` on `Datum` no longer match across signed zeros. That lines 
`Datum` equality up with its ordering (#1959) and with Java's evaluator.
   - A data file that was already written with `-0.0` and `0.0` rows under one 
partition value is now pruned for a predicate on the other value, as Java does.
   
   `public-api.txt` changes because the impls are no longer derived.
   
   ## Are these changes tested?
   
   Yes. Unit tests for literal equality, ordering and hashing, plus a 
regression test each for the splitter, `FanoutWriter`, `ClusteredWriter`, the 
delete file index and the expression evaluator.
   
   ## AI Disclosure
   
   I used Claude Code to help investigate this and to write the fix and tests.
   


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