EdwardShen125 opened a new pull request, #2688:
URL: https://github.com/apache/iceberg-go/pull/2688

   
   `YearTransform.ToHumanString` formatted the year with `strconv.Itoa`, so
   years below 1000 lost their leading zeros: the sentinel `0001-01-01`
   landed in `ts_year=1/`. Java's `TransformUtil.humanYear` and PyIceberg's
   `to_human_year` both pad to four digits, so iceberg-go writes a different
   directory than Spark or PyIceberg for the same partition value. The
   month, day and hour transforms in the same package already pad; only the
   year was off.
   
   Format with `%04d` to match. This changes the directory name for
   pre-1000 year partitions written by earlier iceberg-go builds
   (`ts_year=935` -> `ts_year=0935`); those directories were already
   unreachable from Java/PyIceberg readers.
   
   Tests: new cases in `TestToHumanStringValues` (`0935`, `0001`, `0000`,
   `-001`, `12345`) and `TestPartitionToPath_YearMatchesJava` for the
   path-level output.
   
   Fixes #2603 (reported by @0z5a, confirmed by @AynSiddiqui)
   
   AI-assisted, reviewed by a human.
   


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