LuciferYang opened a new issue, #11228: URL: https://github.com/apache/paimon/issues/11228
**Search before asking** - [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar. **Paimon version** master @ 33dbcfcb17 **Compute Engine** Engine-agnostic (Mosaic file format). **Minimal reproduce step** Create a table with `'file.format' = 'mosaic'` and a `TIMESTAMP(0)` or `TIMESTAMP(0) WITH LOCAL TIME ZONE` column, then insert a row. CREATE TABLE succeeds, but every write fails when the file is opened: ``` java.lang.RuntimeException: writer open failed: unsupported Timestamp unit: Second ``` `ArrowFieldTypeConversion` maps precision 0 to the Arrow `SECOND` unit, and the Mosaic native writer only accepts millisecond, microsecond and nanosecond timestamps (`validate_data_type` in apache/paimon-mosaic `core/src/types.rs`). Precisions 1 to 9 write fine. MySQL CDC maps `DATETIME` without a precision to `TIMESTAMP(0)`, so a CDC job into a Mosaic table hits this on its first write. **What doesn't meet your expectations?** `MosaicFileFormat.validateDataFields` should reject `TIMESTAMP(0)` the way it already rejects `VARIANT`, `BLOB`, `VECTOR`, `MULTISET` and `ROW`, so the table definition fails with a message that names the type, instead of every write failing later with a native error that names neither the column nor the format. **Anything else?** Storing precision 0 as milliseconds would make the type writable, but it needs matching changes on the write and read sides of the Arrow conversion. Rejecting it is the smaller fix. **Are you willing to submit a PR?** - [x] I'm willing to submit a PR! -- 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]
