Repository navigation
Tests with Iceberg tables from the Apache Impala test data - #130028
Open
alexey-milovidov wants to merge 11 commits into
Open
alexey-milovidov wants to merge 11 commits into
alexey-milovidov wants to merge 11 commits into
Conversation
The tables of `testdata/data/iceberg_test` from apache/impala at e35eb8f3582449d736e74ce32f1138f5f5dc085b (Apache-2.0), with the expected results of the Impala tests (`iceberg-*.test`, `test_iceberg.py`): format version 1 tables with legacy metadata, position and equality deletes, migrated tables, `uuid`, v3 default values, deletion vectors, row lineage and `variant`. Many of the tests fail until the corresponding bugs are fixed, see the comments in the tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Workflow [PR], commit [5c9f995] Summary: ❌
AI ReviewSummaryAdds eight stateless interoperability tests using Apache Impala Iceberg fixtures, covering legacy metadata, position and equality deletes, UUIDs, v3 defaults, deletion vectors, row lineage, and variants. No new actionable findings. The previously reported oversized fixture has been removed, and its resolved thread remains closed. Missing context / blind spots
Final VerdictStatus: ✅ Approve The test changes are suitable for approval. Merge remains contingent on the documented reader fixes and passing stateless CI. |
This was referenced Nov 7, 2026
Iceberg v3: row lineage (
_row_id, _last_updated_sequence_number) is wrong for ORC data files
#130032
Closed
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Nov 8, 2026
alexey-milovidov
pushed a commit
to punithns97/ClickHouse
that referenced
this pull request
Nov 8, 2026
`05613` reads the Impala `iceberg_v3_row_lineage_orc` table (Spark, three appends and a compaction that stores the lineage columns), byte-identical to the copy in ClickHouse#130028. `05614` checks the inherited lineage of ClickHouse-written v3 tables with ORC and Avro data files, also after a schema change, and reads ORC files after a skipped row group. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The style check `test_numbers_check` failed with `Gap (5567, 5700) > 100`. Rename `05700`..`05707` to `05616`..`05623`, right after the latest test on master. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=130028&sha=a7c366be243c26422e41562c77d8eba29d471903&name_0=PR&name_1=Style%20check #130028 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eberg tests Its Parquet data file is 1.8 MB, too large to be added to the repository. Fetching it from GitHub at test time would make the stateless test depend on network access, so the table is left out instead and listed in the README. #130028 Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov
marked this pull request as ready for review
November 16, 2026 16:41
PedroTadim
pushed a commit
to hsusul/ClickHouse
that referenced
this pull request
Nov 18, 2026
An Iceberg field added with an `initial-default` must read as that default in
every data file written before it was added (spec, "Column Projection"). The
key was never parsed, so such rows read as NULL, filters on the column missed
them, and a required field added with a default made the table unreadable.
A field absent from a data file is synthesized in two places, and both now use
the default:
- the schema evolution DAG, for a file read under its own older schema: the
constant of a new top-level field, and `AddingTransform` for a field added
inside a struct (also inside list elements and map values);
- the format reader, for a file read under the schema that has the field (its
manifest was rewritten under the newer schema and the old snapshot expired,
or a stale ClickHouse INSERT): Parquet (top level, struct elements at any
depth, requested subcolumns), ORC (top level and struct elements) and Avro
(top level), through a new `ColumnMapper` map of defaults.
The JSON single-value serialization (spec Appendix D) of every type is parsed
once in `IcebergSchemaProcessor`; a malformed default, or a non-null one for a
type that must default to null, fails with ICEBERG_SPECIFICATION_VIOLATION
instead of being ignored. A struct field's own default can only be `{}`, which
stands for the defaults of its fields.
A reader fills a field with its default only when the data file identifies
the fields at that level by field id and none of them has the field's id, the
rule ClickHouse#126879 introduced for Avro: a field missing only by name may be in the
file under another name. With that proof, ORC and Avro no longer read such a
column from a same-named field of the file (a dropped column re-added under
the same name), and ORC builds no search argument for that file, because it
resolves predicate columns by name.
The query condition cache key of UUID-less tables and the Parquet columns cache
identity now include the defaults, since the value read for an absent field
depends on them. A metadata.json schema replaces an identical copy registered
from a manifest header, which does not carry `initial-default`.
The new test reads the Apache Impala and DuckDB Iceberg tables of ClickHouse#130028 and
ClickHouse#130010 (identical files) as written and with their older data files bound to
the newer schema, and ClickHouse-written Parquet, ORC and Avro tables evolved
with nested, required, struct, list and malformed defaults.
Closes ClickHouse#129992
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stateless tests with the Iceberg tables of the Apache Impala test data:
testdata/data/iceberg_testat https://github.com/apache/impala/tree/e35eb8f3582449d736e74ce32f1138f5f5dc085b/testdata/data/iceberg_test (Apache License 2.0), 61 tables, 2.5 MB, intests/queries/0_stateless/data_iceberg/impala/with aREADME.mddescribing the provenance. The files and the directory layout are not modified: the metadata refers to/test-warehouse/...,file:///...andfile:/...locations, and to data in sibling directories of the table (iceberg_multiple_storage_locations).The expected results are those of the Impala tests (
testdata/workloads/functional-query/queries/QueryTest/iceberg-*.test,tests/query_test/test_iceberg.py), cross-checked with PyIceberg on a scratch copy with rewritten paths. For values Impala does not read (ORC/Avrouuidandvariant,binary/timestamptzinitial defaults), the values decoded from the data files or the table metadata.Tests:
05616_iceberg_impala_v1_tables: format version 1 tables by Spark 2.4 and Hive + Iceberg 0.11 (legacyschemawithoutschema-id, nosort-orders), identity/hour partitions of all types, partition column promotion, timestamps before 1970, nested ORC types, files without field ids, data outside the table location.05617_iceberg_impala_position_deletes: position deletes (Parquet and ORC data files, partitioned, all rows deleted, dangling delete after compaction).05618_iceberg_impala_equality_deletes: equality deletes (NULLs, several equality field ids, mixed with position deletes, schema evolution, time travel).05619_iceberg_impala_misc_tables: v2 tables without deletes, upper case column names, migrated Hive tables, mixed Parquet/ORC, Puffin statistics.05620_iceberg_impala_uuid:uuidin Parquet/ORC/Avro, identity and bucket partitions onuuid.05621_iceberg_impala_v3_default_values:initial-defaultfor all primitive types, Parquet/ORC/Avro, partitioned by the defaulted column.05622_iceberg_impala_v3_deletion_vectors_row_lineage: deletion vectors,_row_id/_last_updated_sequence_numberbefore and after compaction.05623_iceberg_impala_v3_variant:variantwritten by Trino and Spark, nested in arrays/maps/structs, in Parquet/ORC/Avro.Left out (see README):
iceberg_v2_null_delete_record(NULLfile_pathin position deletes, which Impala skips with a warning),iceberg_v2_delete_equality_partition_evolution(Impala refuses it, no expected result),iceberg_lineitem_multiblock(1.8 MB data file, too large for the repository).Must be merged after the fixes of:
Related: #129991
Related: #129989
Related: #129990
Related: #129992
Related: #129993
Related: #129994
Related: #123961
Related: #129998
Related: #130001
Related: #130023
Related: #128304
Related: #130031
Related: #130032
Position deletes are not applied when the delete file refers to the data file as
hdfs://localhost:20500/test-warehouse/...and the manifest as/test-warehouse/...(raw string comparison of paths), see the comment in #129990. The missingschema-idin manifest headers and the missingsort-ordersare covered by #129991.Which tests fail until then:
05616: all tables,BAD_ARGUMENTSforschema-id(Iceberg: optionalschema-idis required: v1 metadata withoutschema-idand snapshots withoutschema-idcannot be read (POCO_EXCEPTION) #129991, including the missingschema-idin manifest headers and the missingsort-orderswhich givePOCO_EXCEPTION).05617: all,ICEBERG_SPECIFICATION_VIOLATION(Iceberg: manifests withoutpartition-specin the Avro header are rejected (No partition-spec in iceberg manifest file), the Java reader takes the spec from the manifest list #129989); then deletes not applied (path comparison, Iceberg: file paths outside the tablelocationprefix are resolved to mangled paths (file:/vsfile:///, relative locations, data outside the table directory) #129990); ORC tablesNOT_IMPLEMENTED(Iceberg: position deletes on ORC and Avro data files are not supported (NOT_IMPLEMENTED) #130001).05618,05619:ICEBERG_SPECIFICATION_VIOLATION(Iceberg: manifests withoutpartition-specin the Avro header are rejected (No partition-spec in iceberg manifest file), the Java reader takes the spec from the manifest list #129989);iceberg_v2_delete_both_eq_and_posandiceberg_v2_delete_pos_and_multi_eq_idsalso need the path comparison fix (Iceberg: file paths outside the tablelocationprefix are resolved to mangled paths (file:/vsfile:///, relative locations, data outside the table directory) #129990).05620: ORC uuid NULL (Iceberg:uuidcolumn in ORC data files is silently read as NULL #129993), AvroCANNOT_PARSE_UUID(Avrofixed(16)cannot be read asUUID: Iceberg tables withuuidcolumns in Avro data files are unreadable #129994),iceberg_uuid_test_part(Iceberg: a table identity-partitioned by auuidcolumn returns wrong results and cannot be read — the manifest's rawfixed[16]partition value is never decoded #123961).05621:j.f2NOT_FOUND_COLUMN_IN_BLOCK(Iceberg: struct subcolumnst.xfails withNOT_FOUND_COLUMN_IN_BLOCKon data files written before any schema change #128304) (NULL instead ofinitial-defaultIceberg v3initial-defaultis not implemented: columns added with a default are read as NULL from older data files #129992 was fixed by Read the Iceberginitial-defaultof fields absent from older data files #130101).05622: passes (ORC row lineage Iceberg v3: row lineage (_row_id,_last_updated_sequence_number) is wrong for ORC data files #130032 was fixed by Fix_row_idand_last_updated_sequence_numberof Iceberg ORC and Avro data files #130140).05623:iceberg_v3_spark_variantmanifest list not found (Iceberg: file paths outside the tablelocationprefix are resolved to mangled paths (file:/vsfile:///, relative locations, data outside the table directory) #129990),trino_variant(Iceberg: manifests withoutpartition-specin the Avro header are rejected (No partition-spec in iceberg manifest file), the Java reader takes the spec from the manifest list #129989), ORC variant NULL (Iceberg v3:variantcolumn in ORC data files is read as NULL #130031),arr_struct_v.vempty (Iceberg Parquet: subcolumn of an array of structs (profile.hobbies.name) reads as empty arrays #130023) (Avro variantILLEGAL_COLUMNIceberg v3variantin Avro data files is not supported (Type Dynamic is not compatible with Avro record) #129998 was fixed by Read Iceberg v3variantcolumns from Avro data files #130078).Changelog category (leave one):
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/130028]