jackylee-ch opened a new pull request, #9103:
URL: https://github.com/apache/paimon/pull/9103
### Purpose
`MosaicRowTypeVisitor` accepted every timestamp precision, but precision 0
maps to Arrow
`TimeUnit.SECOND` (`ArrowFieldTypeConversion#getTimeUnit`), which the mosaic
native writer
rejects. `CREATE TABLE t (ts TIMESTAMP(0)) WITH ('file.format' = 'mosaic')`
succeeded and the
first `INSERT` failed with `RuntimeException: failed to open writer` and a
null cause — the
real reason ("unsupported Timestamp unit: Second") only reached stderr from
native code.
MySQL `DATETIME`/`TIMESTAMP` without an explicit length maps to
`TIMESTAMP(0)`
(`MySqlTypeUtils`), so a CDC-synced table hits this by default.
Reject precision 0 at schema validation, as `LanceFileFormat` does for
`LOCAL_ZONED_TIMESTAMP`.
### Tests
`MosaicFileFormatTest` — added rejecting cases for `TIMESTAMP(0)` and
`TIMESTAMP_LTZ(0)`, plus
a positive case over precisions 1-9. 12/12 pass; both negatives fail without
the fix.
--
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]