Repository navigation
Conversation
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 5 Gate B rounds, 4 findings
Severity: ❌ blocker / Also measured and deliberately not changed, disclosed rather than raised: when a USER structure Session id: cron:clickhouse-review-slot-52:20260806-102000 |
Pre-PR validation gate (click to expand)Updated in place again, so this PR still carries one validation gate rather than several. This
Every new arm was checked against a mutant that reddens it, and each mutant reddens a distinct set. That |
|
cc @divanik @Michicosun, could you review this? The data lake table functions parsed the |
|
Workflow [PR], commit [a8dcb07] Summary: ❌
AI ReviewSummaryThe PR preserves explicit names and types for Findings❌ Blockers
Missing context / blind spots
Tests
Final VerdictStatus: ❌ Block. Align explicitly declared filter inputs consistently and add the focused nullability regression before merging. Existing threads require no new replies or resolution changes; no duplicate inline review was submitted. |
CI finish ledger — f19e77bEvery failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
Not PR-caused. Session id: cron:our-pr-ci-monitor:20260806-203000 |
The structure argument of the data lake table functions was reported by DESCRIBE but ignored by SELECT, so one table-function expression yielded two different schemas: DESCRIBE showed the user's declared structure while the read used the schema derived from the lake metadata. The read path re-derived metadata from the lake snapshot and overwrote the columns the caller had declared. It now keeps the caller's columns across that adoption when the table function was given an explicit structure, so DESCRIBE and SELECT agree. The snapshot's sorting key is kept only while it still describes the columns being emitted. Read-in-order trusts that key to describe them, so a key naming a column the read no longer emits, or emits at a different type, is unsound rather than merely stale; it is resolved through subcolumns so a nested key that is still described survives. Closes ClickHouse#113361
f19e77b to
0fe428b
Compare
Build profile diff (arm_release)Commit See the job log for details. |
A data file written under an older Iceberg schema is read through the schema evolution transform, whose output is the current metadata schema alone. A requested column that no schema declares was therefore dropped before column extraction, so DESCRIBE listed it while SELECT on the identical expression failed with NOT_FOUND_COLUMN_IN_BLOCK. This is reachable through any data lake table function whose `structure` argument names a column the table does not have. Synthesize those columns via addMissingDefaults after the transform, which is what a read of an absent column already yields when no evolution transform runs, so the evolved and unevolved paths now agree. Verified against the unevolved path for a nullable type, a non-nullable type taking the type default, an explicit DEFAULT expression, and filtering through both WHERE and PREWHERE, including the case where the declared column is used only by the filter and a different column is selected: filter-only inputs are absent from the reader's requested columns, so they are collected separately. A name that the file's own older schema carries is deliberately left alone: the reader resolves it by field id, so it denotes that physical column rather than a missing one, and filters on it are evaluated there. Synthesizing it would turn today's error into wrong results. The synthesized columns are excluded from AddingDefaultsTransform, which looks its missing-value bitmask up by a column's position in the block and would otherwise index past the bitmask the reader sized to its own header. The existing Iceberg "columns the metadata does not have" arm could not catch any of this: its table was never populated, so no reader ran, and its groupArray oracle could not tell default rows from no rows either way. It is populated and its oracle now counts rows. Also add the `structure` argument to the Iceberg and Paimon Azure, HDFS and Local syntax signatures and cluster examples, which omitted it while the prose below documented it.
|
Fixed the schema-evolution gap in this PR: on a data file written under an older Iceberg schema, a column supplied only by the Repro (before this commit): create an Iceberg table The declared column is now filled via A name the file's own older schema carries is deliberately left alone: the reader resolves it by field id, so it denotes that physical column and filters on it are evaluated there. Synthesizing it would turn today's error into wrong results. The regression arm that should have caught this was vacuous - its table was never populated, so no reader ran, and a Two residuals I hit while verifying, both reproduced identically on this PR's previous head and left alone:
Also added |
…l applies `AddingDefaultsTransform` reads the missing-value bitmask the format reader produced, which describes the reader's own columns and rows. It was installed at the end of the pipeline, after delete and filter transforms had dropped rows and after the data lake schema evolution transform had changed column positions, and the bitmask is not carried across any of them. So a declared DEFAULT indexed an entry describing a different column, or past the end. Install it directly after the reader, restricted to the columns the reader emits. Columns produced later already carry their declared defaults. A fallback filter has the mirror-image problem: it is planned against the declared types while the transform emits the lake's own, so a comparison returned a differently-nullable result than its plan recorded. Convert the columns those filters read, before they run. Only filter inputs are converted, so a read that does not filter keeps its previous plan. Only a declared `structure` can attach a DEFAULT to a column the evolution transform emits, because Iceberg rejects a non-nullable ADD COLUMN, so this became reachable when the structure argument started being honoured on reads and no release shipped it. Reachable through any data lake table function whose structure argument declares a DEFAULT on such a column, declares a filtered column at another nullability than the file's own schema, or declares a DEFAULT while the table has deletes. The values now match the authoritative table read of the same data, including a table holding both a file written before the column existed and one written after: the older rows read NULL, as Iceberg fills them, and the newer rows keep their stored values. A declared DEFAULT does not override that fill, which would otherwise make one declaration mean different values per file. Row counts are part of every new oracle, so an arm cannot pass by returning nothing.
|
Agreed, and fixed in 5af5075. The mechanism is as described, and my previous round had dismissed it against the wrong baseline: I compared against this PR's own first commit, which already honours Against master the shape does not abort, so it is this PR's:
Only a declared Rather than exclude a wider set of names, the transform now runs directly after the format reader, where the bitmask's column and row correspondence both still hold. My first attempt only compared column positions, and you were right that this is about more than the synthesized set: probing your case surfaced two further shapes that were also broken and are also fixed here.
New arms cover all three, including a table with one file written before the column existed and one after: the older rows read NULL, as Iceberg fills them, and the newer rows keep their stored values, so a declared Two items from the same review I did not act on, with measurements rather than argument:
|
…jected Two ways an explicit structure was not honored on the shard of a cluster read. addStructureAndFormatToArgsIfNeeded fills in a structure only when the argument is "auto": all six positional branches test for it, but the loop that rewrites key-value arguments replaced the value unconditionally. The replacement is built from resolved columns via ColumnsDescription::getAll, which keeps names and types only, so a cluster read reached the shard without the DEFAULT clause the user declared and filled zeros, while the non-cluster read of the same expression returned the declared defaults. Measured on a two-shard cluster: an explicit-URL read returned 0 where the equivalent s3()/icebergS3() read returned 42. Reachable through s3Cluster and the data lake *Cluster functions alike. A named collection takes the early-return branch above and was already correct, which is why the existing regression did not cover this. The value is evaluated like the key beside it, because it may be any constant expression rather than a literal. A name the file's own older schema carries is deliberately not synthesized: the reader resolves it by field id, so it denotes that physical column. It was still added to the list the synthesis is built from, so requesting it beside a column that does need synthesizing created both, and the read returned type defaults instead of rejecting the name as it does when the name is requested alone. Arms are added for the named-collection, explicit-URL and non-literal structure forms, each paired with the non-cluster read of the same expression as its reference, and for the old-schema name requested beside a synthesized one. The sorting-key arm now asserts worker activity before counting sorts, so that a count of zero cannot be read from an absence of worker rows. Delta Kernel is not built under MSan, so the test carries no-msan like the other tests that read Delta fixtures.
|
Half right, and it led to a real bug next door. Pushed The collapse to names-and-types is real, but that value is only ever filled in: But the loop that rewrites key-value arguments had no such guard, so an explicit structure written Reachable on plain Regression arms added for the named-collection, explicit-URL and non-literal forms, each paired with Noted while verifying, not changed: Session id: cron:clickhouse-maint-slot-12:20260815-004200 |
The test spent most of its wall clock starting clients, not running queries: 81 separate client invocations against roughly 46 ms of server work each. On the instrumented builds a client start-up costs ~0.45-0.6 s, so the flaky check (which runs a changed test ~50x) crossed the 180 s per-test cap and failed with "Test runs too long". Queries whose output is not post-processed now run grouped in one client session each, taking the client count from 81 to 41. Arms that expect an error keep their own client, because an error ends a session, and so do arms whose output is piped through awk/grep/wc. The four "EXPLAIN PIPELINE ... | grep -c" arms became an in-SQL countIf over the EXPLAIN subquery, which is the form the maintainers asked for and needs no separate process. Measured on the master ASan build, same server and fixtures for both forms: 50.4 s -> 23.5 s, a 2.14x reduction, which puts the observed CI arms (228-237 s) near 110 s. Output is unchanged: both forms were captured under clickhouse-test and are byte-identical to each other and to the committed reference. Separately, three arms mixed a bare toTypeName() with an aggregate, which the old analyzer rejects with NOT_AN_AGGREGATE because it does not constant-fold toTypeName() the way the new analyzer does. Those now wrap it in any(), which returns the same value on both analyzers and needs no reference change. Each of the three arms already asserts a row count, so the type assertion cannot be weakened by an empty result.
|
Fixed the flaky-check timeout on The test spent its wall clock starting clients, not running queries. Instrumented every call on the Queries whose output is not post-processed now run grouped in one session each: 81 client processes Measured on the master ASan build, same server and fixtures for both forms: 50.4 s -> 23.5 s Also fixed three arms that mixed a bare |
CI finish ledger - 6653e9eEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
The Session id: cron:our-pr-ci-monitor:20260815-160000 |
The flaky check runs a changed test about fifty times, and 04748 was landing at 180.7-186.3 s against the 180 s cap on amd_asan_ubsan while debug, tsan and binary stayed under 110 s. Accounting the failing job's own query_log showed where the time went for one 179.0 s run: 86.9 s of query execution, 81.2 s spread over 40 client process starts at 2.03 s each under the check's 38-way concurrency, and 11.9 s of intra-session gaps. Process starts, not queries, were the term that put it over. Two changes bring the process count from 41 to 19. Arms whose output was piped into awk only needed the pipe because DESCRIBE prints a tab, so they now ask for CustomSeparated with a space delimiter and join a session; that is byte-identical to what the awk emitted. Groups that were separated only by an echo marker are merged, with the marker becoming a SELECT of the same string. An arm expecting an error still goes last in its group, since an error aborts the rest of a session, and the two arms needing distinct query ids keep their own clients. The reference file is unchanged. The gtest is removed. Its four cases assert that a lake sorting key survives only while it still describes the emitted columns, and the flat-key cases are already asserted from SQL in this test through EXPLAIN PIPELINE. Its remaining cases use a nested key, which no read can reach: a lake table with a nested sort order fails to parse that order on both master and this branch, before any of this code runs. It also broke Bugfix validation, which overlays the new test onto the merge base and could not compile a call to a function this branch introduces.
|
Pushed 04748 over the flaky-check budget. I accounted the failing job's own On the same binary and server, debug went 8.89 s -> 5.13 s. Substituting 18 remaining gaps into CI's
Iceberg/Paimon/Delta sweep shows no new failures against the pre-change baseline on the same binary. |
CI finish ledger - 77f9862Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
Both PR-caused rows from the previous ledger ( Session id: cron:our-pr-ci-monitor:20260816-030000 |
|
📊 Cloud Performance Report 🟢 AI verdict: This PR only changes data lake reads over object storage: Iceberg manifest pruning and Paimon partition pruning type checks, keeping the user's structure when the schema reloads, and type alignment for filters and identity partition columns. ClickBench and TPC-H read local MergeTree tables and never run this code. ClickBench Q20 shows -42.7% with about half the CPU time. The change is too large to override, so the improvement verdict stays, but nothing in this diff explains it, and it should be checked with a rerun before anyone credits the PR. ClickBench Q33 (-5.3%) is a noisy query inside master's recent range and was correctly suppressed; nothing in the TPC-H results was flagged. clickbench🟢 1 improved Flagged queries (1 of 43)
Change = percent below ×2; the ratio of medians (×N faster/slower) beyond, where percent understates the scale. q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 No significant changes Debug info
|
getIdentityPartitionColumnValues names an extracted value with the field's full name, so a nested partition source is called s.c. The type that value was converted at was then looked up with tryGetByName over getClickHouseTableSchemaById, which holds top-level fields only: a nested field is registered separately, under that same dotted name, in clickhouse_types_by_source_ids and clickhouse_ids_by_source_names. So the lookup missed, the constant was built at the declared type from a lake-typed Field, and a retyping declaration over a nested identity partition column raised Code: 170, has Int64, requested String, which is the failure the previous commit fixed for a top-level column. The lookup now completes by field id for any partition name the top-level list does not hold, using tryGetColumnIDByName then tryGetFieldCharacteristics on the same schema id. That second function is the one the extraction itself used to choose the conversion type, so the appended pair is the extraction type by construction, and its name is the dotted full name, so neither the helper nor its two call sites change. Top-level names keep the existing path, which matters because a top-level column may itself be named a.b: splitting the name on a dot would resolve that to a nonexistent nested field and lose the value. No wire format changes; a name the schema does not know is skipped and behaves as before. No supported statement writes a nested partition spec: the writer builds its name-to-source-id map from top-level columns only, so PARTITION BY s.c is rejected with Unknown field to partition. The arm is therefore an integration test alongside the four existing nested and dotted-name arms, built through pyiceberg, and reads a table whose whole struct is removed from every data file so the value can only come from the manifest. A second integration test covers what no stateless arm can see: with both partition columns absent from the data files, a read that declined to substitute returns the declared type's default instead of the value, and a mutant that declines leaves the whole stateless file passing. An explicit PREWHERE on a nested column cannot be an arm at all. Object storage lists top-level names in supportedPrewhereColumns and does not admit subcolumns, so the analyzer rejects it before any reader runs. The nested filter arm uses a plain WHERE, whose equality against a string holds only for a converted value. Three counter arms pin the low-cardinality half of the rule that keeps pruning where a declaration differs only in a wrapper. That rule is three independent decisions, one per pruning site, and the existing mutants restore exact equality and so delete both strippings at once; one arm per site, each with a mutant deleting only its own stripping, is what isolates them. Each pins allow_suspicious_low_cardinality_types, without which the declaration is rejected outright. The explicit PREWHERE arm over an identity-partitioned table now pins parallel_replicas_for_cluster_engines off, like the five arms before it. The ParallelReplicas stateless lane enables parallel replicas through a users profile rather than through the runner's randomization, and the table function is then wrapped in a cluster storage that does not support PREWHERE. Running the whole file under that lane's configuration found this one arm rejected and every pruning counter undisturbed. The plain WHERE arm pins the two prewhere movers, which are randomized off, so the sites it passes through do not vary; its answer is the same either way. Each query_log lookup is scoped to the run's database, which the style check requires and which a query id alone does not give. Co-Authored-By: Claude Opus 5 <[email protected]>
Three of the Paimon oracles compare a pruned read against the same read with pruning off. max() over an empty set returns 0, not NULL: ProfileEvents is Map(LowCardinality(String), UInt64), so ProfileEvents['x'] is a non-nullable UInt64 and SingleValueDataFixed::insertResultInto pushes its zero-initialised value unconditionally. A pruning query that logged no QueryFinish row therefore compared as 0 < N and the arm reported success, which is the precise failure those arms exist to catch: an exception on the path under test is logged as ExceptionWhileProcessing and filtered out by the row-type predicate. Each pair is now one query with a presence guard for both reads, and the comment that claimed the opposite is replaced by the invariant. Measured both ways by pointing one arm's pruning query id at an id that is never run: the old text reports 1 and the file passes, the new text reports 0 and the file fails. The three row-group counter arms read the initiator's query_log row, but ParquetPrunedRowGroups is emitted where the reader runs, and that is a secondary query wherever the cluster rewrite wraps the table function; a secondary query also logs the default database rather than the initiator's. Both were measured on one read: the counter is 1 on the secondary row and 0 on the initiator's. The arms are now scoped to the initial query id and admit a row that is not the initial one, which is what makes the file pass under the ParallelReplicas lane configuration, where it failed before this change. The manifest counters are undisturbed there for a reason that is also measured: manifest pruning is counted while the initiator lists files, and no paimonLocalCluster is registered for the rewrite to target, so no paimonLocal read is wrapped at all. The nested identity partition filter arm compared s.c against an equality, which returns the same rows whether the comparison runs at String or at Int64. It now uses an ordering bound, where '2' and '10' both sort below '4' but only 2 is below 4, so the row set holds only at the declared type. The value arm above it keeps the non-injection property this arm used to duplicate. The plain-WHERE ice25 arm now pins the cluster rewrite off, because under the wrapper the mover has no PREWHERE to move into and its own pins cannot reach the substitution the arm is there to exercise. The pin comment no longer presents the same setting on a paimonLocal arm as doing work today; those pins are kept so the arms are pinned the day such a function is registered. No reference line moves, no arm is weakened and none is removed. Each rewritten arm's liveness is re-proved by a single-decision mutant that reddens it and nothing else.
Internal second-model reviewEvery finding below comes from an independent review pass over this branch, adjudicated against the This branch went through six internal fix rounds and has reached my review-round limit, so it is
|
…budget 04748_datalake_table_function_honors_structure reached 198.8-201.3 s per run on `Stateless tests (amd_asan_ubsan, flaky check)` against the 180 s per-test ceiling that check enforces (tests/clickhouse-test:3578-3583), failing 5 of 5 runs. The ceiling is per test file, so the arms move into two new files instead of being trimmed or exempted with `long`: no assertion is changed, added or removed. Each arm keeps its query text and expected value byte for byte, the three references partition the old one exactly, every (marker, expected values) block survives unsplit, and each file carries only the fixtures and session settings its own arms use. The subjects are the declaration being honored or set aside on a local read (04748), the declaration not costing manifest, row group or partition pruning nor the metadata sorting key (04749), and the same contract across S3 and the cluster rewrite (04751). Measured under that check's own thread fuzzer on one debug binary, solo, over two rounds: 341.9/381.3 s for the old file against 124.7/128.5, 124.3/118.8 and 169.0/133.3 s. Scaling the 201.3 s CI maximum by each share gives 76, 73 and 100 s, a 1.8x worst-case margin. 04748 drops the optimize_read_in_order clamp because it passes with that setting forced to 0 where 04749 fails, and a randomized batch draws it 0 for 04748 and never for the two files that keep the clamp. 50 randomized runs of each file pass; all three still fail on the pre-fix binary, so each reproduces the bug on its own. Co-Authored-By: Claude Opus 5 <[email protected]>
| if (schema_changed) | ||
| { | ||
| const Block & header_after_transform = builder.getHeader(); | ||
| NamesAndTypesList columns_with_synthesized; |
There was a problem hiding this comment.
This still misses nested identity-partition projections on ORC.
buildIdentityPartitionColumnsDag only keeps entries whose full partition name already exists in the reader header, but ORC is read with supports_tuple_elements = false (StorageObjectStorage.cpp:313 / prepareReadingFromFormat.cpp:83-100), so a requested s.c is read as its parent s. NativeORCBlockInputFormat documents the same assumption at findHeaderTypeByPath: its header carries only the parent column for ORC tuple elements.
On an Iceberg ORC file where identity partition s.c is absent from the data file, builder.getHeader() contains s, not s.c, so this DAG injects nothing. ExtractColumnsTransform then takes s.c from the default-filled missing parent tuple instead of the manifest value, and SELECT s.c returns NULL/defaults even though the manifest has the real partition value. The new identity-partition read fix is still incomplete for ORC-backed tables.
We need the same dotted-name / parent-tuple resolution here that the ORC reader already uses, so a manifest value for s.c can be injected even when the physical header only contains s.
There was a problem hiding this comment.
Confirmed, reproduced, and identical on the pre-PR base, so it is not introduced by this PR.
Fixture: local Iceberg table, identity partition on nested s.c (source id 3), s pruned from both
data files, so s.c can only come from the manifest.
declared format SELECT id, s.c on af948ff on the pre-PR base
Parquet 1 2 / 2 10 1 2 / 2 10
ORC 1 \N / 2 \N 1 \N / 2 \N
SELECT s on the ORC arm gives (NULL,NULL), so the parent tuple is default-filled as you describe.
Two scope corrections.
It is wider than ORC. checkIfFormatSupportsPrewhere has a single registration,
ParquetV3BlockInputFormat.cpp:406, which returns true unconditionally, so supports_tuple_elements
(StorageObjectStorage.cpp:313) is true only for Parquet and is decided from the table-level format
name alone. Same fixture: Parquet returns [2,10], while ORC, Avro, Arrow and Native all
return NULL.
It is not this PR's code. if (header.has(name)), supports_tuple_elements = format_supports_prewhere
and the dotted name that getIdentityPartitionColumnValues produces are all unchanged from master. When
the gate rejects every name the function returns an empty optional before any line this PR adds runs, so
that path cannot differ from master. What this PR changed there is only the type an injected value is
built on: the base fails the same read with Code: 170 BAD_GET once the declared structure retypes
s.c, and this head returns 2 and 10 as String.
Injection on real ORC files is fine: an ORC-backed table with a top-level identity partition id,
pruned from both .orc files, reads id back from the manifest correctly.
No change here. A fix task is created for the pre-existing defect.
There was a problem hiding this comment.
Fixed in #117122, which injects the manifest value into the parent tuple the reader actually carries instead of matching the dot-joined name against the format header, so it also covers the SELECT s and PREWHERE cases.
There was a problem hiding this comment.
The original gate is still present on this head: buildIdentityPartitionColumnsDag only keeps entries whose full name is already in the reader header (src/Storages/ObjectStorage/StorageObjectStorageSource.cpp:363). For ORC/Arrow/Native, a requested nested partition field such as s.c still arrives via its parent tuple s, so this branch still drops the manifest value before any injection happens.
So the #117122 fix is not actually present here yet; this thread should stay open until that change is merged or cherry-picked into this branch.
CI finish ledger - af948ffEvery failure below has an owner: a fixing PR, or a full-effort fix task whose fixing-PR link will be posted here when it opens. Only
CIDB also holds 20 Session id: cron:our-pr-ci-monitor:20260830-023000 |
Follow-up on the
|
Three conflicts, all in code master also changed since `e3a0441c`. `StorageObjectStorageCluster`, header and constructor: master added `format_settings_` and `catalog_` at the same trailing position this branch added `preserve_structure_for_reads_`, so the two insertions collided on position only. Both are kept, master's two first so its own call site in `DatabaseDataLake.cpp` keeps binding positionally, and the two table function call sites this branch touches now pass those defaults explicitly. Member declarations and the initializer list follow the same order. `DataLakeConfiguration.h`: master changed `getExternalMetadata()` to return `std::shared_ptr<IDataLakeMetadata>`, and this branch inserted `schemaReloadIgnoresExplicitStructure()` immediately above it. Master's signature is taken and this branch's method is kept. The identity partition block in `StorageObjectStorageSource.cpp` merged without a conflict but still read the raw pointer, so its `dynamic_cast<const IcebergMetadata *>` becomes `std::dynamic_pointer_cast<const IcebergMetadata>`, the spelling master now uses for the DeltaLake check in the same file. Co-Authored-By: Claude Opus 5 <[email protected]>
…bility
Both pruning sites treated a nullability difference as a wrapper that cannot reorder
values, so a partition key the lake schema declares nullable kept its pruning when the
query declared it non-nullable. Reading a partition whose value is NULL then materializes
the declared type's default under `input_format_null_as_default`, while both pruners map
that NULL to positive infinity, so the partition is dropped while holding rows the filter
matches. Withhold pruning for that direction; the widening one is unaffected, and so is a
low-cardinality difference.
Paimon, measured on `data_minio/paimon_all_types`, whose nullable `f_date` partition key
has five rows in its NULL partition. Before this commit,
SELECT count() FROM paimonLocal(..., 'Parquet', 'f_date Date')
WHERE f_date = toDate('1970-01-01')
SETTINGS use_paimon_partition_pruning = 1, input_format_null_as_default = 1
returned 0, the same query with pruning off returned 5, and the unfiltered
`countIf(f_date = toDate('1970-01-01'))` over the same declaration returned 5.
Iceberg, measured on a table partitioned by a nullable `p` with two rows in its NULL
partition. Before this commit, `WHERE p = 0` under a declared `p Int64` returned 0 with
`use_iceberg_partition_pruning = 1` (`IcebergPartitionPrunedFiles` = 3) against 2 with it
off and 2 unfiltered. Min/max pruning alone does not have this shape, because an all-NULL
column carries no bounds to compare, so a partitioned fixture is what reaches it.
Co-Authored-By: Claude Opus 5 <[email protected]>
CI finish ledger - b6c7354Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
#119728 is the causal owner rather than a same-area coincidence: it rejects exactly the Not reachable from this diff: this branch changes CI is finished on this head: every praktika check-run is Session id: cron:our-pr-ci-monitor:20260914-220033 |
|
Dear @scanhex12, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
Two conflicts, both in the include blocks of files master also changed since `caf26def`; no logic was touched to resolve them. `ManifestFilesPruning.cpp`: master added `Common/DateLUT.h`, `Core/DecimalFunctions.h` and `base/arithmeticOverflow.h` where this branch added `DataTypes/DataTypeLowCardinality.h`. All four are kept. `StorageObjectStorageSource.cpp`: master added `Interpreters/castColumn.h` where this branch added `Interpreters/addMissingDefaults.h`. Both are kept. Master's ClickHouse#122681 builds the min/max hyperrectangles and the new date partition ranges only for the field ids in `used_columns_in_filter`, which is the list this branch filters, so a column whose declared type the pruner must not compare stays unpruned on those paths too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Since ClickHouse#120311, `enable_analyzer = 0` is accepted and replaced with `1`. On the analyzer, a key-value `structure` whose value calls `hostName()` is rejected on a cluster read with `Code: 36 ... is not a constant expression`, and master rejects it the same way on plain `s3Cluster` (measured on master `6ee563bc`). The two arms that pinned the old analyzer to guard that shape therefore assert what master no longer accepts. The literal-operand `concat` arm stays, without the setting that is now a no-op: it reads the declared column (`2 2`) where master rejects it with `Code: 47`. Co-Authored-By: Claude Opus 5.5 <[email protected]>
CI finish ledger - a96940cEvery failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
146 of 146 check runs completed (126 passed, 15 not selected, 5 red: the jobs above, one test), and #122895 merged at 16:58Z, after this run was dispatched (12:34Z), so the tree CI built ( Session id: cron:our-pr-ci-monitor:20260929-173122 |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…-honor-structure-datalake-tf Co-Authored-By: Claude Opus 5.5 <[email protected]>
…unction_honors_structure` Master now rejects `UInt64` columns in an Iceberg schema (ClickHouse#118596), so `ALTER TABLE ice17 ADD COLUMN c Nullable(UInt64)` throws and aborts the rest of the session. Add the column as `Nullable(Int64)` instead, and declare it the same way in the `icebergLocal` structure arguments that read `ice17`. The values and the reference output are unchanged. The other `UInt64` declarations in the test are table function structures, which are not subject to the check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Dear @JiaQiTang98, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed the
structureargument of thepaimon*andiceberg*table functions being reported byDESCRIBEbut ignored bySELECT, so one expression yielded two schemas. Astructurethat declares names and types is now used for reads, as it already was fors3andfile, so it can select a subset of the columns or override their types, and a declared type the data files cannot supply raises an error instead of silently using the metadata schema. The declared type also governsPREWHEREand data file pruning, which compared values at the metadata type and could return rows the declaration excludes or drop rows it selects. A declared columnDEFAULT, inserts, the persistentPaimon*/Iceberg*engines anddeltaLake*are unchanged. Closes #113361.Description
DESC paimonLocal(p, 'Parquet', 'f_int Int64')reportedInt64whileSELECT toTypeName(f_int)onthe same expression reported
Nullable(Int32).icebergLocaldiverged too.The table function was already correct. The storage replaced the whole
StorageInMemoryMetadata, columns included, whenever the per-format schema reload was enabled,unconditional for Paimon and Iceberg. That happens at five sites, one per query, so fixing the
constructor is not enough.
A
preserve_structure_for_readsflag is now computed in both table functionexecuteImploverridesand retained by both storage classes, which route their five reload sites through one helper each.
The helper still pins
datalake_table_stateand, when the flag is set, keeps the declared columns.The metadata sorting key is resolved against the metadata schema, so it survives only while every
column its expression reads, a nested one included, is still present with the same type. A worker gets the initiator's own resolved columns, so it keeps the key.
Pruning follows suit, since a bound is compared at the metadata type: a retyped column withholds
pruning, as does a nullable partition key declared non-nullable, whose NULL reads as the declared
default but compares as positive infinity.
The flag also requires that the declaration carries no column
DEFAULT: such a default ismaterialized from one reader's missing-value bitmask, while a lake resolves its row-level deletes and
its sorting key from its own metadata against whatever values reach them, so the two cannot both be
served on one path.
Deliberately unchanged, each measured: the persistent engines;
INSERT INTO TABLE FUNCTION iceberg*(...);DatabaseDataLakecatalog tables;deltaLake*, whose reload is an opt-in; and plains3/file, where a declaredDEFAULTis honored. The new stateless tests assertDESCandSELECTon one expression and pin every unchanged arm, each red without the change.Workflow [PR]
Sync PR [sync-upstream/pr/113650]