thswlsqls opened a new pull request, #8643:
URL: https://github.com/apache/paimon/pull/8643
### Purpose
fix #8642
- `HiveTypeUtils.HiveToPaimonTypeVisitor.atomic()` mapped Hive `timestamp`
to `DataTypes.TIMESTAMP_MILLIS()` (precision 3), silently truncating
sub-millisecond values when a Hive schema is inferred into Paimon
(migrate/clone/CREATE via Hive).
- Change it to `DataTypes.TIMESTAMP()` (default precision 6) for parity with
the same-file local-zoned reverse path (`TIMESTAMP_WITH_LOCAL_TIME_ZONE()`,
precision 6) and `SparkTypeUtils.java:436` (`new TimestampType()`, precision 6).
- Existing persisted schemas are unchanged — only newly inferred
migrate/clone/CREATE schemas move from precision 3 to 6.
### Tests
- Added `HiveTypeUtilsTest#testToPaimonTypeTimestampPrecision` asserting
`toPaimonType("timestamp")` equals `DataTypes.TIMESTAMP()` and its precision
equals the local-zoned reverse-path precision.
- `mvn -pl paimon-hive/paimon-hive-common -am clean install` (JDK 11) —
HiveTypeUtilsTest: 2 tests passed.
--
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]