Skip to content

Add Iceberg tables from the Apache Doris tests - #130016

Open
alexey-milovidov wants to merge 12 commits into
masterfrom
iceberg-doris-tables
Open

alexey-milovidov wants to merge 12 commits into
masterfrom
iceberg-doris-tables

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

Adopt Iceberg tables and expected results from the Apache Doris tests (https://github.com/apache/doris/tree/41cd2b473e9d9bb26be089f302cdfdfe6e107eaf, Apache-2.0) as stateless tests. The tables were written by Spark (3.x/4.0), Flink, the Iceberg Java API and Unity Catalog (Delta UniForm).

43 tables (3.1 MB) are added to tests/queries/0_stateless/data_iceberg/doris, from two sources (provenance in README.md there):

  • be/: the four Iceberg tables of the Doris BE unit tests, be/test/exec/test_data (HDFS locations hdfs://hdfs-cluster/..., one with a location that differs from the directory name). Doris checks only their structure; the values in the reference were checked with PyIceberg, and the ORC and Parquet copies agree.
  • warehouse/: tables of the Doris external table regression tests, from the archive https://doris-regression-hk.oss-cn-hongkong.aliyuncs.com/regression/datalake/pipeline_data/iceberg_data_spark40_paimon142.zip. It is downloaded by start_iceberg in docker/thirdparties/run-thirdparties-docker.sh and is a snapshot of the MinIO bucket of the Doris Iceberg docker stack made by docker/thirdparties/docker-compose/iceberg/tools/save_docker.sh. The archive is published by the Apache Doris project for its test suite but has no license file of its own. The bucket layout is kept (s3a://warehouse/..., s3://warehouse/...), including data files outside the table location (warehouse/data/...). Only the latest metadata.json of each table is kept.

The expected results come from regression-test/data/external_table_p0/iceberg/*.out of the matching .groovy suites, translated to ClickHouse SQL and the ClickHouse text format. For the schema change tables, which ClickHouse can't read yet, the reference was produced with PyIceberg and checked against the Doris .out.

Tests:

  • 05616_iceberg_doris_complex_types: 5-level nested arrays, maps with array keys, deep structs (ORC and Parquet, v1 and v2); BE nested user profile tables.
  • 05617_iceberg_doris_schema_evolution: type widening (int to bigint, float to double, decimal(12,N) to decimal(20,N), also inside arrays, maps and structs), dropped, added, renamed and reordered columns and struct fields; upper case column names; column names that are not valid Avro names.
  • 05618_iceberg_doris_partitions: identity partitions on upper and lower case columns, NULL, float and string partition values, truncate, day on dates, day/identity/bucket on 1000 rows of all primitive types (with column statistics as in Doris).
  • 05619_iceberg_doris_deletes: Flink upsert equality deletes (with a position delete in the same commit) on one and three key columns, Spark merge-on-read position deletes over many commits, Parquet and ORC.
  • 05620_iceberg_doris_timestamp_filters: timestamp and timestamptz comparisons with literals of different sub-second precision (min/max pruning), date and string predicates.
  • 05621_iceberg_doris_data_outside_table_location: data files outside the table location, added with the Java API, and a Delta UniForm table with physical column names.

Must be merged after the fixes of:
Related: #129990
Related: #130023
Related: #130025
Related: #128304

Until then, these tests fail:

05618_iceberg_doris_partitions and 05619_iceberg_doris_deletes pass now.

Already fixed on master: #130000 (by #130080), #130024 (by #130114), #130001 (ORC position deletes, by #130093).

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

🤖 Generated with Claude Code


Workflow [PR]
Sync PR [sync-upstream/pr/130016]

Iceberg tables from the Apache Doris repository (`be/test/exec/test_data`) and from the
archive of its external table regression test environment
(`iceberg_data_spark40_paimon142.zip`, produced by
`docker/thirdparties/docker-compose/iceberg/tools/save_docker.sh`), with the expected results
of the Doris regression tests: complex types, schema evolution, partitions and transforms,
Flink equality deletes, Spark position deletes, timestamp filters, and data files outside
the table location.

Some tests fail until the following bugs are fixed: `parquet-list-map-key`,
`orc-avro-position-deletes`, `path-resolver`, a `BAD_GET` exception for decimals widened
inside arrays, and empty subcolumns of arrays of structs in Iceberg Parquet tables.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov alexey-milovidov added the pr-not-for-changelog This PR should not be mentioned in the changelog label Nov 7, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [b85490d]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_asan_ubsan, db disk, distributed plan, targeted) FAIL
05620_iceberg_doris_timestamp_filters FAIL cidb
05616_iceberg_doris_complex_types FAIL cidb
05620_iceberg_doris_timestamp_filters FAIL cidb
05617_iceberg_doris_schema_evolution FAIL cidb
05620_iceberg_doris_timestamp_filters FAIL cidb
05616_iceberg_doris_complex_types FAIL cidb
Too many test failures FAIL cidb
Finish Workflow FAIL
python3 ./ci/jobs/scripts/workflow_hooks/can_be_merged.py --review-threads FAIL

AI Review

Summary

Adds 43 Apache Doris Iceberg fixture tables and six stateless tests covering nested types, schema evolution, partitions, deletes, timestamp filtering, and external data paths. Reviewed head b85490d529aee06b8b89e0ac205c95be881b0ddb. The existing fixture-storage blocker remains, and four tests still await reader fixes. No new inline findings.

Findings

❌ Blockers

  • tests/queries/0_stateless/data_iceberg/doris/README.md:42: Keep the binary fixture dataset outside git. [dismissed by author -- https://github.com/Add Iceberg tables from the Apache Doris tests #130016#discussion_r4511388663] The current change still adds 602 Avro/Parquet/ORC files totaling 2,502,498 binary bytes; the complete fixture directory is 3,094,440 bytes. Small individual files do not remove the permanent aggregate history cost or satisfy the review rule against committing datasets over 1 MB. Store the intact dataset as a pinned, checksum-verified artifact, supplied during CI image preparation or test setup, while retaining provenance, scripts, and references in git. This preserves its internal paths and can preserve offline test execution.
Tests
  • ⚠️ The author's 2026-11-24 validation reports four deterministic failures whose fixes remain open: 05616 needs #132229, 05617 needs #125439, 05620 needs #130123, and 05621 needs #130082. Merge the dependencies and obtain passing results for all six tests without weakening their references. The earlier ORC position-delete failure is fixed; it is no longer a pending dependency.
  • ⚠️ The current Praktika report has no completed Doris stateless results: the targeted ASan/UBSan job is pending, and the broader jobs are skipped because of the unresolved review thread. Fast test excludes these tests through their no-fasttest tags. No local ClickHouse tests were run in this CI review job.
Final Verdict

Status: ❌ Block

Resolve the fixture-storage blocker and land the four reader fixes, then demonstrate that all six added tests pass.

…time zone in another session time zone

Related: #130023
Related: #130024
Related: #130025

Co-Authored-By: Claude Opus 5.5 <[email protected]>
alexey-milovidov and others added 3 commits November 9, 2026 08:54
#130000 and #130024 are fixed on master. The schema change tables are readable now,
but subcolumns of the evolved struct still fail (#128304). Link the issues instead of
the internal bug names.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

- Only the latest `*.metadata.json` file of each table is kept. The older metadata versions are not used for reading
the current snapshot, and some tables have more than 30 of them (about 90 KB each).
All other files (manifest lists and manifests of the older snapshots, data and delete files) are kept as they are.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Blocker] Keep the binary fixture dataset outside git

This change commits 602 Avro/Parquet/ORC files (2,502,498 bytes of binary data), with the fixture directory totaling about 3.1 MB. The review rule prohibiting binary blobs and datasets larger than 1 MB applies to this dataset; these objects permanently increase the history downloaded by every clone. Please publish the selected fixtures as a versioned, checksum-verified test artifact and fetch it during test setup, retaining the scripts, references and provenance in git.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵 Not changing this. Unlike the other Iceberg fixture PRs, this one has no large file: the biggest is a 92 KB metadata.json and the biggest data file is 22 KB, so it is a set of small upstream tables kept as-is (manifests reference each other by path, so they can't be shrunk without losing the upstream expected results). The only big table of the archive (table_with_append_file, 33 MB) is already left out, see README.md. Fetching the fixtures at test time would make the stateless tests depend on network access; other data directories next to it are much larger (data_parquet 37 MB, data_delta_lake 21 MB, data_lake_corpus 24 MB). Leaving the final decision to a human reviewer.

alexey-milovidov and others added 3 commits November 10, 2026 07:52
… `05620_iceberg_doris_timestamp_filters`

The single row of `tb_ts_ntz_filter` is returned by the unfiltered query, the equality, the `>` comparison
with the shorter literal and the `<` comparison with the larger literal: four rows, not five.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master (9b98ff3). I re-ran the Doris tests locally on the merged tree. 05618_iceberg_doris_partitions passes. The other five fail deterministically, with the same differences the PR description lists as known. Each one is waiting for a fix that hasn't merged yet:

This PR should stay unmerged until these land. The open review thread about the binary fixture size already has a reply and needs a decision from a human reviewer.

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master (6ea176f). The red Stateless tests (05616, 05617, 05619, 05620, 05621) are the known failures from the PR description, and I reproduced them locally. Each fix is still open: #130023 (no PR yet), #128304 (#125439), #130001 (#130093), #129990 (#130082), #130025 (#130123). 05618_iceberg_doris_partitions passes. This PR should be merged only after those fixes. A human reviewer still needs to decide on the open review thread about keeping the 3.1 MB fixture directory in git.

@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master (30ff53f). I re-ran all six Doris tests locally on the merged tree. 05618_iceberg_doris_partitions passes. The other five fail deterministically, and the failures are the known ones listed in the PR description. The red Stateless tests (amd_asan_ubsan, db disk, distributed plan, targeted) job shows the same failures for 05616, 05617 and 05620. All the fixes are still open:

This PR should be merged only after those fixes. The open review thread about keeping the 3.1 MB fixture directory in git still needs a decision from a human reviewer.

@clickhouse-gh clickhouse-gh Bot added comp-iceberg Apache Iceberg tables: reading and writing Iceberg metadata (snapshots, manifests, schema evoluti... and removed comp-testing Test content only (no production code). labels Nov 19, 2026
alexey-milovidov and others added 2 commits November 24, 2026 00:17
… on ORC are supported now

Position deletes against ORC data files were implemented in
#130093
(#130001), so after merging
`master` the test passes and the comment about the expected failure is stale.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@alexey-milovidov

Copy link
Copy Markdown
Member Author

🕵 Merged master (a7735de), which brings in #130093 (position deletes on ORC data files, #130001). I re-ran all six Doris tests locally on the merged tree:

This PR should be merged only after those four fixes. A human reviewer still needs to decide on the open review thread about keeping the 3.1 MB fixture directory in git.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-iceberg Apache Iceberg tables: reading and writing Iceberg metadata (snapshots, manifests, schema evoluti... pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant