jlon opened a new pull request, #11235: URL: https://github.com/apache/paimon/pull/11235
### Purpose Close #11228. `MosaicFileFormat.validateDataFields` accepts `TIMESTAMP(0)` and `TIMESTAMP(0) WITH LOCAL TIME ZONE`, but `ArrowFieldTypeConversion` maps precision 0 to the Arrow `SECOND` unit, which the Mosaic native writer rejects with `unsupported Timestamp unit: Second`. The table can therefore be created and every write fails later, naming neither the column nor the format. This rejects precision 0 where the type is still known: ``` Mosaic file format does not support TIMESTAMP with precision 0, use precision 1 to 9 ``` Precisions 1 to 9 are unaffected. Storing precision 0 as milliseconds would also work but needs matching changes on the write and read side of the Arrow conversion, so rejecting it is the smaller fix. ### Tests - Added `testValidateDataFieldsTimestampWithoutPrecisionUnsupported` and `testValidateDataFieldsLocalZonedTimestampWithoutPrecisionUnsupported` to `MosaicFileFormatTest`; both fail on master and pass with this change. - Added `testValidateDataFieldsTimestampWithPrecisionSupported` to pin precisions 1/6/9 and `TIMESTAMP(3) WITH LOCAL TIME ZONE`. - `mvn -pl paimon-mosaic -Dtest=MosaicFileFormatTest test` (12 tests, pass), `mvn -pl paimon-mosaic spotless:check`. -- 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]
