zhjwpku opened a new pull request, #1158:
URL: https://github.com/apache/iceberg-cpp/pull/1158

   Iceberg's year transform counts years since 1970. For 32768-01-01, the 
expected result is 32768 - 1970 = 30798. Converting the date to 
std::chrono::year can wrap 32768 to -32768, producing -34738 after subtracting 
1970. With only this upper bound, year(d) IN (0, 1) can then skip a file 
containing rows from 1970. The month transform has the same calendar range 
limit.
   
   Split epoch days into 400-year Gregorian cycles using floor division. 
Convert the day within a cycle to a calendar date in 1970 through 2369, then 
add the cycle offset using 64-bit arithmetic. Both transforms now handle dates 
and timestamps on either side of the epoch.
   
   Test the change from 32767 to 32768, both ends of the date and microsecond 
timestamp ranges, and nanosecond timestamps just before the epoch. The 
regression fails with the previous implementation. All 431 utility tests and 
578 schema tests pass.


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