Hi everyone, While reviewing the partition transform fixtures in Pull request [1], @ laskoviymishk <https://github.com/laskoviymishka>a and I noticed that Appendix B [2] requires converting nanosecond timestamps to microseconds before bucket hashing, but does not specify how to round negative values.
For 1969-12-31T23:59:59.999999999 (−1 ns), floor division hashes −1 µs and gives bucket[100] = 12; truncation toward zero hashes 0 µs and gives 76. Iceberg Java [3], Go [4], and Rust [5] use floor division. Rust recently changed its implementation to match Java [6]. Could Appendix B [2] be updated with next sentence? For bucket hashing, convert nanoseconds since the Unix epoch to microseconds by dividing by 1,000 and rounding toward negative infinity. That would give the pre-epoch conformance case an explicit spec basis. [1] https://github.com/apache/iceberg-verification/pull/17#discussion_r4472635274 [2] https://iceberg.apache.org/spec/#appendix-b-32-bit-hash-requirements [3] https://github.com/apache/iceberg/blob/main/api/src/main/java/org/apache/iceberg/util/DateTimeUtil.… <https://github.com/apache/iceberg/blob/main/api/src/main/java/org/apache/iceberg/util/DateTimeUtil.java> [4] https://github.com/apache/iceberg-go/blob/main/transforms.go [5] https://github.com/apache/iceberg-rust/blob/main/crates/iceberg/src/transform/bucket.rs [6] https://github.com/apache/iceberg-rust/pull/2891 Thanks for attention, Roman
