Repository navigation
Description
Company or project name
No response
Describe what's wrong
When reading an Iceberg table with the native (V3) Parquet reader, ClickHouse throws ICEBERG_SPECIFICATION_VIOLATION if a data file physically contains the reserved, required row-lineage columns _row_id (field id 2147483540) or _last_updated_sequence_number (field id 2147483539). These are reserved, required metadata field ids defined by the Iceberg spec; the reader treats them as ordinary unknown field ids and refuses the file. The exception fires even for queries that do not select those columns.
Does it reproduce on the most recent release?
Yes
How to reproduce
Which ClickHouse version: any version with the native V3 Parquet reader + Iceberg field-id column mapping (master).
- Create an Iceberg v3 table (which requires row lineages to be written) using any external engine (e.g. Spark/pyiceberg).
- Perform some action that causes data files to materialise the row-lineage columns with non-null values, for example a table maintenance action like RewriteDataFiles via Spark. Per the spec the columns are written into the Parquet schema with their reserved field ids.
- Query the table from ClickHouse, e.g.
SELECT count() FROM iceberg(...). It does not matter if you try to select the row lineage columns or not.
Expected behavior
The read query should succeed and not throw ICEBERG_SPECIFICATION_VIOLATION.
The Iceberg spec resolves columns by field id and requires readers to ignore file columns that are not part of the projected schema; reserved metadata ids are specifically meant to be understood by readers, not rejected.
Error message and/or stacktrace
Code: 743. DB::Exception: Parquet file has column _row_id with field_id 2147483540 that is not in datalake metadata: (in file/uri <object-storage>/<warehouse>/<namespace>/<partition>/<filename>.parquet): While executing ParquetV3BlockInputFormat: While executing ReadFromObjectStorage. (ICEBERG_SPECIFICATION_VIOLATION) (version 26.4.2.10 (official build))
Related issues and pull requests
No response
Additional context
Row lineages in the Iceberg spec
Minimally it would be great if ClickHouse could tolerate the existence of row lineage field IDs even if it doesn't yet fully support writing them.
Version info
- Resolved by: Tolerate Iceberg v3 reserved row-lineage field ids in native Parquet reader #107377
- Merged into:
26.7.1.980(included in26.7and later) - Backported to:
26.6.3.29,26.5.7.43,26.3.18.25
Activity
clickgapai commentedon Jun 12, 2026
Found via ClickGap automated review. Please close or comment if this is incorrect or needs adjustment.
TL;DR
ClickHouse Parquet reader incorrectly throws ICEBERG_SPECIFICATION_VIOLATION for v3 tables
ClickGap verified: reproduced it with the script below on
master; tested 4 version(s) — 2 affected, 2 clean (see Affects); bisected the regression to a single PR (#102362).Reproduction
Bisect
a4cd0cfece7126.5Affects
master, 26.526.4, 26.325.8Suggested next step
Review PR #102362 for the introducing change in
comp-datalake. If a forward-fix or revert is intended, the bisect data above narrows the search space.Component:
comp-datalakeSeverity:
P2cc introducing PR author: @scanhex12
cc introducing PR reviewer: @clickhouse-gh[bot] @asya-ch
ClickGap · Finding:
h_issue_107343Triage metadata
comp-datalakecomp-parquet-reader-v3comp-datalake): @scanhex12 @divanikgregakinman commentedon Jun 13, 2026
Heads-up that the updated automated triage looks confounded: the reader defect is older than #102362, and this does affect 26.3 / 26.4.
e9f5100bd01),SchemaConverter::useColumnMapperIfNeededalready throwsICEBERG_SPECIFICATION_VIOLATIONfor an unmappedfield_id. Field ids for data files in iceberg writes #102362's only change toSchemaConverter.cppwas unrelated List-element naming.PrepareForWrite.cpp→__set_field_id): 26.5 is when ClickHouse's own writer began stampingfield_ids into Iceberg data files.25.11.2.24release binary, and was hit in production on26.4.2.10.The current repro reports "clean" on 26.3/26.4 because it writes the data file with ClickHouse and then orphans a column via the metadata — but pre-26.5 ClickHouse writes no
field_ids, so there is nothing to orphan and the reader falls back to name-matching. The real-world trigger is an external, spec-compliant Iceberg writer emitting the reserved row-lineage ids (_row_id/_last_updated_sequence_number). A writer-independent repro — inject the reservedfield_iddirectly into the data file — reproduces across 25.11 → master.Fix + writer-independent regression test: #107377 (should be backported to 26.3 and 26.4).
Tolerate Iceberg v3 reserved row-lineage field ids in native Parquet …
Tolerate Iceberg v3 reserved row-lineage field ids in native Parquet …