Skip to content

[iceberg] Refuse nanosecond timestamps while Iceberg metadata is enabled - #9455

Open
plusplusjiajia wants to merge 5 commits into
apache:masterfrom
plusplusjiajia:gh-iceberg-refuse-nanos
Open

[iceberg] Refuse nanosecond timestamps while Iceberg metadata is enabled#9455
plusplusjiajia wants to merge 5 commits into
apache:masterfrom
plusplusjiajia:gh-iceberg-refuse-nanos

Conversation

@plusplusjiajia

Copy link
Copy Markdown
Member

Purpose

IcebergDataField emits timestamp_ns for timestamp columns of precision 7 and above, but Paimon writes those columns as Parquet INT96, which Iceberg reads as a microsecond zoned timestamp. The metadata and the data files therefore disagree, and nothing reports it — an Iceberg reader silently returns wrong values.
This refuses such a column while metadata.iceberg.storage is enabled, next to the existing geospatial rule in SchemaValidation, so it applies wherever a schema is validated: creating a table, altering one, and enabling Iceberg metadata on a table that already has such a column.
This is a behaviour change: a table with a nanosecond timestamp column mirrors today, producing metadata no Iceberg reader can use. Lower the precision to 6, or disable metadata.iceberg.storage

@plusplusjiajia
plusplusjiajia force-pushed the gh-iceberg-refuse-nanos branch from 813aab2 to de786b7 Compare August 29, 2026 01:02
@plusplusjiajia
plusplusjiajia marked this pull request as ready for review August 29, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant