q8webmaster opened a new pull request, #8231:
URL: https://github.com/apache/paimon/pull/8231

   ## Problem
   
   \`IcebergConversions.timestampFromBytes\` decoded the manifest INT64 bound 
with \`Timestamp.fromEpochMillis\` for \`precision == 3\`, but the Iceberg 
manifest always stores timestamps as INT64 **microseconds** regardless of 
precision. For precision 4–6 the same method already used 
\`Timestamp.fromMicros\` correctly, making the precision-3 branch inconsistent.
   
   The practical consequence is that reading a precision-3 timestamp bound back 
from a manifest returns a value 1000× too large, and if that inflated value is 
subsequently passed through \`Timestamp.toMicros()\` it causes 
\`ArithmeticException: long overflow\` in \`Math.multiplyExact\`.
   
   ## Fix
   
   Use \`Timestamp.fromMicros\` for all supported precisions in 
\`timestampFromBytes\`.
   
   ## Changes
   
   - \`IcebergConversions.java\`: \`timestampFromBytes\` uses \`fromMicros\` 
for all precisions (removes the \`precision == 3\` special-case)
   - \`IcebergConversionsTimestampTest.java\`: 
\`provideTimestampToPaimonCases\` updated to supply microsecond values for the 
precision-3 test cases


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

Reply via email to