Skip to content

Support trino in iceberg tests & add test for minimal v3 - #104849

Merged
scanhex12 merged 6 commits into
ClickHouse:masterfrom
scanhex12:trino_testing
May 19, 2026
Merged

scanhex12 merged 6 commits into
ClickHouse:masterfrom
scanhex12:trino_testing

Conversation

@scanhex12

@scanhex12 scanhex12 commented May 13, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Support trino in iceberg tests

Version info

  • Merged into: 26.5.1.854

@clickhouse-gh

clickhouse-gh Bot commented May 13, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [30aa4de]

Summary: ⏳

job_name test_name status info comment
Upgrade check (amd_release) FAIL
Error message in clickhouse-server.log (see upgrade_error_messages.txt) FAIL cidb

AI Review

Summary

This PR expands Iceberg v3 + Trino interoperability (REST catalog, metadata parsing, and integration tests). Two correctness issues are still live in generateManifestList: unsupported format-version values are still serialized as v2, and v3 carry-forward of previous manifest-list entries still drops sequence fields. These can produce semantically incorrect metadata, so the PR is not ready to merge.

Findings

❌ Blockers

  • [src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergWrites.cpp:450] generateManifestList still routes every version != 1 to manifest_list_v2_schema. Unsupported values (for example iceberg_format_version = 4) no longer fail fast and are silently serialized with v2 schema rules.
    Suggested fix: accept only 1, 2, 3 explicitly and throw BAD_ARGUMENTS for anything else.
  • [src/Storages/ObjectStorage/DataLakes/Iceberg/IcebergWrites.cpp:596] In the use_previous_snapshots rewrite path, content, sequence_number, and min_sequence_number are copied only for version == 2. For version == 3, old entries lose those fields during rewrite, breaking sequence semantics across snapshots.
    Suggested fix: copy these fields for both v2 and v3 (version > 1 or explicit version == 2 || version == 3).
Tests
  • ⚠️ Add a focused regression that sets an unsupported iceberg_format_version and verifies write fails before manifest-list serialization.
  • ⚠️ Add a v3 multi-snapshot regression that validates preserved non-zero content / sequence_number / min_sequence_number on carried-forward manifest-list entries.
Final Verdict
  • Status: ⚠️ Request changes
  • Minimum required actions:
  1. Reject unsupported Iceberg format versions in generateManifestList.
  2. Preserve v2/v3 manifest-list sequence fields when copying previous snapshot entries.
  3. Add focused regressions for both behaviors.

@clickhouse-gh clickhouse-gh Bot added the pr-build Pull request with build/testing/packaging improvement label May 13, 2026
@scanhex12
scanhex12 marked this pull request as draft May 13, 2026 13:06
BadLiveware pushed a commit to BadLiveware/ClickHouse that referenced this pull request May 16, 2026
`clickhouse_fuzzer` runs the full `clickhouse-local` binary (see
`programs/local/fuzzers/clickhouse_fuzzer.cpp`) which spins up a complete
clickhouse-server-grade runtime: JeMalloc arenas, OpenSSL initializer,
static initializers, and full query execution. Baseline RSS is close to
the libFuzzer default `rss_limit_mb=2048`, so fuzzed inputs that trigger
even moderate query-time allocations push the process past the limit.

CIDB shows 7 unrelated PRs in 7 days all hitting OOM at 2049-2056 Mb —
just barely over the 2048 Mb default. Failure mode is uniform:

    libFuzzer  out-of-memory (used: 2049-2056Mb; limit: 2048Mb)  oom-<hash>

Bumping to 4096 Mb follows existing precedent for fuzzers with similar
workloads:
  - `execute_query_fuzzer.options`: rss_limit_mb = 4096 (also runs query
    execution; same author bumped this in commit bafb7d7)
  - `data_type_deserialization_fuzzer.options`: rss_limit_mb = 4096
  - `create_parser_fuzzer.options`: rss_limit_mb = 6144

The limit still bounds the target (it does not disable the check via
`rss_limit_mb=0`), so genuine memory regressions above 4 GB will still
be caught.

CIDB evidence (last 30 days, all 10 hits — 0 on master because libFuzzer
does not run on master regularly):
    PR ClickHouse#99740  (4 hits, Apr 19-21)
    PR ClickHouse#104231, ClickHouse#104849, ClickHouse#104956, ClickHouse#96844, ClickHouse#104510, ClickHouse#104492  (1 hit each,
    May 13-15)
@scanhex12 scanhex12 changed the title Support trino in iceberg tests Support trino in iceberg tests & add test for minimal v3 May 18, 2026
@scanhex12
scanhex12 marked this pull request as ready for review May 18, 2026 11:55
@SmitaRKulkarni SmitaRKulkarni self-assigned this May 18, 2026

@SmitaRKulkarni SmitaRKulkarni left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Rest all LGTM

@clickhouse-gh

clickhouse-gh Bot commented May 19, 2026

Copy link
Copy Markdown
Contributor

LLVM Coverage Report

Metric Baseline Current Δ
Lines 84.10% 84.10% +0.00%
Functions 91.40% 91.40% +0.00%
Branches 76.60% 76.50% -0.10%

Changed lines: 68.85% (42/61) | lost baseline coverage: 1 line(s) · Uncovered code

Full report · Diff report

@scanhex12
scanhex12 enabled auto-merge May 19, 2026 17:09
@scanhex12
scanhex12 added this pull request to the merge queue May 19, 2026
Merged via the queue into ClickHouse:master with commit decf957 May 19, 2026
161 of 164 checks passed
@scanhex12
scanhex12 deleted the trino_testing branch May 19, 2026 17:23
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label May 19, 2026
@Avogar

Avogar commented May 21, 2026

Copy link
Copy Markdown
Member

New test is flaky: #105524

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

Labels

pr-build Pull request with build/testing/packaging improvement pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants