OIiveirra opened a new pull request, #68161:
URL: https://github.com/apache/doris/pull/68161

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary:
   
   When a Paimon table evolves a timestamp column from `TIMESTAMP(6)` to 
`TIMESTAMP(0)`, old files can retain fractional-second values. Doris readers 
did not consistently apply Paimon SDK truncation semantics: the legacy native 
reader could preserve fractional seconds, the Format V2 reader could round to 
the next second, and the JNI path did not materialize the narrowed precision 
consistently.
   
   This change materializes Paimon timestamp values by truncating to the target 
precision across legacy native, Format V2, and JNI readers. Ordinary SQL cast 
mappings retain their existing rounding behavior.
   
   The regression coverage exercises Parquet and ORC files, V1 native, V2 
native, and JNI readers, with values that distinguish truncation from rounding 
(`.600000`, `.999999`, and `.400000`).
   
   ### Release note
   
   Paimon scans now truncate timestamp values when reading files written before 
a TIMESTAMP precision reduction.
   
   ### Check List (For Author)
   
   - Test
       - [x] Regression test: `paimon_timestamp_types` passed with 
`-forceGenOut` and a second run without `-forceGenOut`; covers Parquet/ORC, V1 
native, V2 native, and JNI readers.
       - [x] Unit Test: 2 targeted BE timestamp precision tests passed.
       - [x] Unit Test: `PaimonColumnValueTest` 9/9 passed; the 80-module FE 
reactor completed successfully.
       - [x] Build and style checks: BE/FE build, Clang-format 16, build 
hygiene, and `git diff --check` passed.
       - [ ] Full community P0/P1 and complete BE/FE UT groups: to be executed 
by the community CI pipeline.
   
   - Behavior changed:
       - [x] Yes. Paimon timestamp schema evolution now truncates fractional 
seconds to the target precision instead of preserving or rounding them.
   
   - Does this need documentation?
       - [x] No.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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