Repository navigation
Conversation
An annotated `Tuple`, `Array` or `Map` field that another engine made optional in a new schema stopped matching its inherited `clickhouse.type` annotation. Files written with the old schema then could not be read: the schema transform threw `ICEBERG_SPECIFICATION_VIOLATION`, or the states were read as `String`. ClickHouse reads an optional struct, list or map as a required one, so the annotation still applies to it. Addresses defect 3 of #2680 (comment) Related: #2680
…ormats Tests: - Remove gtests that functional tests already cover: five `IcebergSchemaProcessor` cases, `AnnotationKeepsAggregateStateVersion` (an `Array` of version 0 states is added to `04673` instead), `ModifyColumnComparesWithTheAnnotatedTypeOfAState` (a `MODIFY` to another aggregate function is added to `05816` instead) and `UnchangedSchemaSendsOnlyThePropertyChanges`. Trim `ClickHouseTypeAnnotationsInEffectForSchema` and the `MODIFY COLUMN` metadata generator test to what nothing else covers. - Merge `05815` into `05814`, and `05817` and `05819` into `05818`, which now covers metadata another engine edited. Drop the `SHOW CREATE` checks of `05814`. - Remove the unused `settings` parameter of `make_iceberg_s3`. Code: - `getSchemaTransformationDag` takes the field types the schemas were registered with instead of parsing them and their annotations again. - One helper in `registerStorageObjectStorage.cpp` resolves the table's `allow_aggregate_function_states_in_open_formats` for both object storage and data lake engines, replacing `setTableAllowAggregateFunctionStates`. - The cluster query rewrite adds the `SETTINGS` of the query in one place. Related: #2680
The cluster check compared only results, which are the same whether or not the other nodes apply the recorded types: `SimpleAggregateFunction(sum, Int64)` equals `Int64`. It now reads the secondary queries from `system.query_log` and checks that the table's `allow_aggregate_function_states_in_open_formats` reached them: an enabled one as an argument of the table function, a disabled one in the query's `SETTINGS`. Without the rewrite in `StorageObjectStorageCluster::updateQueryForDistributedEngineIfNeeded` the check fails. Restore the gtest `SkippingTheSchemaDoesNotPublishIt`, the only test of `SchemaParsing::Skip`.
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Chef's kiss. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
The gtest `ModifyColumnChangingOnlyTheSimpleAggregateFunctionKeepsTheSchema` removed in this PR was the only test of a `MODIFY COLUMN` that adds a `SimpleAggregateFunction` annotation to a plain column or changes only its aggregate function. `05428` now runs both, `Int64` to `SimpleAggregateFunction(sum, Int64)` and then to `SimpleAggregateFunction(max, Int64)`, and checks that the rows written with both schemas read with the new type and that `current-schema-id` stays the same.
|
CI triage for
Every other check that ran is green: 173 pass. That includes all the stateless (amd_debug, asan_ubsan, binary, cas storage), integration (asan_ubsan old analyzer 1–8/8) and unit (asan_ubsan) jobs in the praktika report. The 209 "skipping" entries are jobs this PR's CI config doesn't schedule (msan/tsan/arm builds and their tests, stress, fuzzers); they are not failures. Nothing needs to change in this PR. RegressionTestsRelease / Common (settings) / settings: pre-existing on antalya-26.8, not PR-causedJob: https://github.com/Altinity/ClickHouse/actions/runs/46901330425/job/143620969785 What happened: the Why it is not this PR:
Fix (outside this PR): add a default-value snapshot entry for |
An annotated
Tuple,ArrayorMapIceberg field made optional by another engine kept files written with the old schema unreadable (ICEBERG_SPECIFICATION_VIOLATION, or states read asString). The annotation now still applies.Also trims tests and duplicated code of #2680: gtests covered by functional tests are removed, overlapping functional tests are merged, and
05814now checks insystem.query_logthat the table's setting reaches the other nodes of a cluster.Related: #2680 (comment)
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
Fix reading an Iceberg table with an
AggregateFunctionstate inside aTuple,ArrayorMapcolumn after another engine made the column optional.CI/CD Options
Exclude tests:
Regression jobs to run: