Repository navigation
Fix flaky test 04146_iceberg_orc_row_policy_prewhere on release branches - #107970
Conversation
Pre-PR validation gate
Session id: cron:clickhouse-worker-slot-2:20260619-120900 |
|
cc @divanik — could you review this test-only fix? |
|
Workflow [PR], commit [4aef3f8] Summary: ✅ AI ReviewSummaryThis PR adds Final VerdictStatus: ✅ Approve |
|
CI finished on
No PR-caused failures. |
StorageObjectStorage caches supportsPrewhere() at table-construction time from input_format_parquet_use_native_reader_v3 (Parquet's prewhere-support checker returns that setting's value). The test creates an Iceberg table with format Parquet and relies on PREWHERE, but the CREATE TABLE block did not pin the setting, so a randomized session with native_reader_v3=0 baked supports_prewhere=false into the storage object. Subsequent SELECT ... PREWHERE then failed at analysis time with ILLEGAL_PREWHERE, even though the SELECTs pinned native_reader_v3=1 (too late, the storage was already constructed). On master the setting is obsolete and removed from clickhouse-test randomization, so the test never sees native_reader_v3=0 there; on the 26.3 and 26.4 release branches the setting is still live and still randomized, so the test failed deterministically about 1 in 6 runs in ReleaseBranchCI and every backport PR. Pin native_reader_v3=1 in the CREATE TABLE block, matching the sibling test 04147_iceberg_orc_schema_evolution_row_policy. No-op on master. Co-Authored-By: Claude Opus 4.8 <[email protected]>
4652070 to
4aef3f8
Compare
|
Rebased on master and re-triggered CI (head @alexey-milovidov asked about this exact flaky test on #109279 today; this is the in-progress fix. It is a test-only +3-line change (pin cc @scanhex12 — could you review? |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 67 line(s), 3 function(s) across 31 file(s) · Details Top files
|
CI finish ledger — 4aef3f83c4df8c1e6a1f3e0f7e0e4f8b (revived head)Test-only PR (+3 lines in
Session id: cron:our-pr-ci-monitor:20260703-190000 |
alexey-milovidov
left a comment
There was a problem hiding this comment.
Ok... just for release branches.
…_prewhere on release branches
Backport #107970 to 26.6: Fix flaky test 04146_iceberg_orc_row_policy_prewhere on release branches
Cherry pick #107970 to 26.3: Fix flaky test 04146_iceberg_orc_row_policy_prewhere on release branches
…_prewhere on release branches
Backport #107970 to 26.4: Fix flaky test 04146_iceberg_orc_row_policy_prewhere on release branches
Backport #107970 to 26.5: Fix flaky test 04146_iceberg_orc_row_policy_prewhere on release branches
Backport #107970 to 26.3: Fix flaky test 04146_iceberg_orc_row_policy_prewhere on release branches
…row_policy_prewhere on release branches
…row_policy_prewhere on release branches
…-iceberg-prewhere-pin-native-reader-v3 Fix flaky test 04146_iceberg_orc_row_policy_prewhere on release branches
The count-only query and the input_format_defaults_for_omitted_fields = 0 query added by ClickHouse#116666 test the native Parquet reader. The test was backported to 26.3 unchanged (ClickHouse#128501), and the 26.3 runner randomizes input_format_parquet_use_native_reader_v3 to 0 in about 1 of 6 runs. The legacy ParquetBlockInputFormat resolves every header column in initializeIfNeeded() before its count-only branch, so with input_format_parquet_allow_missing_columns = 0 the missing column `d` throws THERE_IS_NO_COLUMN (seen on the 26.3 backport ClickHouse#128753). Pin the reader in the SETTINGS of those two queries. A query-level pin overrides the runner's injected value for that query only, so the older reader-agnostic Parquet query keeps exercising the legacy reader on 26.3. On master the setting is obsolete and accepted without effect; the change matters once backported to 26.3 (same shape as ClickHouse#107970). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Related: #101206
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
04146_iceberg_orc_row_policy_prewherefails deterministically (~1 in 6 runs)on the
26.3and26.4release branches, breakingReleaseBranchCIand everybackport PR's stateless suite. It is clean on master.
Root cause:
StorageObjectStoragecachessupportsPrewhere()attable-construction time. For format
Parquetthe prewhere-support checkerreturns the value of
input_format_parquet_use_native_reader_v3. The testcreates an Iceberg table with format
Parquetand usesPREWHERE, but theCREATE TABLEblock did not pin that setting. A randomized session withinput_format_parquet_use_native_reader_v3 = 0therefore bakedsupports_prewhere = falseinto the storage object, and the laterSELECT ... PREWHEREfailed at analysis time withILLEGAL_PREWHERE(Code182) — even though those SELECTs pin
= 1, which is too late because thestorage was already constructed.
On master
input_format_parquet_use_native_reader_v3is obsolete and wasremoved from
clickhouse-testrandomization (commit 80f3bb8, "Remove oldParquet writer and reader implementations"), so the failing value never
occurs there. On
26.3/26.4the setting is still live and still randomized,so the table is sometimes built with the old reader and the test fails.
Fix: pin
input_format_parquet_use_native_reader_v3 = 1in theCREATE TABLEblock, matching the sibling test
04147_iceberg_orc_schema_evolution_row_policy. This is a no-op on master(the setting is already effectively always 1 there).
Verification (debug build, branch base
backport/26.4/106349, commita477775):
input_format_parquet_use_native_reader_v3=0viathe runner: 206 FAIL / 17 OK (
ILLEGAL_PREWHERE).clickhouse-test --test-runs 40: 40/40 OK.CREATEunder session v3=0 throwsILLEGAL_PREWHERE; with thepin the three queries return the reference values 139 / 144 / 11120.
Report:
https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=26.4&sha=d4d44a390d59339d45f76829011eedc123ddcf5b&name_0=ReleaseBranchCI
Version info
26.7.1.960(included in26.7and later)26.6.2.70,26.5.6.42,26.4.5.130,26.3.17.47