jackylee-ch opened a new pull request, #9577: URL: https://github.com/apache/paimon/pull/9577
### Purpose `zeroLastDigits` and `unixTimestamp` drop the low digits with integer division, which rounds toward zero. Epoch millis are negative before 1970, so both move the value forward instead of flooring: narrowing `1969-12-31 23:59:59.999999` to `TIMESTAMP(0)` yields `1970-01-01 00:00:00`, and `-1500` millis casts to epoch second `-1` instead of `-2`. Reached from `TimestampToTimestampCastRule` and `TimestampToNumericPrimitiveCastRule`. Flooring is what #9203 and #8769 chose for the sibling DATE and TIME casts, and what `DateTimeUtils.floor` already does in the same file. ### Tests `DateTimeUtilsTest`, `CastExecutorTest`. Written with Claude Code; reasoning and verification are mine. -- 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]
