Repository navigation
Fix notHas key type compatibility - #115233
Closed
alexey-milovidov wants to merge 95 commits into
Closed
alexey-milovidov wants to merge 95 commits into
alexey-milovidov wants to merge 95 commits into
Conversation
This reverts commit 54b63e1.
…kHouse into mutation-partition-pruning
Adapt the mutation partition-pruning feature to the refactored `MutationCommand`, which no longer stores parsed `partition`/`predicate` members. On master a `MutationCommand` serializes the alter command into `ast_text` and re-parses it on demand via `MutationCommand::ast`, so all access to the command's partition/predicate now goes through `command.ast()->...`. The new multi-partition `IN PARTITION p1, p2, ...` support is carried in the `ASTAlterCommand::partitions` field, which is round-tripped through `ast_text` (parser, `clone`, `formatImpl` and `forEachPointerToChild` all handle it). Also resolved the `optimize_mutations_with_partition_pruning` setting declaration (master relocated `use_partition_pruning`) and the updated `MutationCommand::parse` signature. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Fix compilation against APIs that changed on master while this branch was open: - `IStorage::getInMemoryMetadataPtr` now requires `(ContextPtr, bool bypass_metadata_cache)`; pass `(query_context, false)` in `getPartitionIdsPrunedByPredicate`. - `ActionsDAGWithInversionPushDown` gained a `bool boolean_context` parameter; pass `true` (partition pruning analyzes a `WHERE` predicate as a filter, matching the other index-analysis call sites). - `StorageReplicatedMergeTree.cpp` now dereferences the parsed `ASTAlterCommand` returned by `MutationCommand::ast`, so include `Parsers/ASTAlterQuery.h` for the complete type. Verified all touched translation units pass `-fsyntax-only` against the current master headers. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…utation-partition-pruning # Conflicts: # src/Core/Settings.cpp # src/Interpreters/MutationsInterpreter.cpp # src/Storages/MergeTree/MergeTreeData.cpp
…utation-partition-pruning
…utation-partition-pruning
…utation-partition-pruning
The 2026-08-10 master merge brought in the same Analyzer/Planner headers that this PR had added for the analyzer-mode pruning path, so `Analyzer/TableNode.h`, `Analyzer/Resolve/QueryAnalyzer.h`, `Planner/PlannerContext.h` and `Planner/CollectTableExpressionData.h` ended up included twice, failing the `Build (arm_tidy)` CI job: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110968&sha=f522814bfd0224913648939766dabee21c9609d8&name_0=PR&name_1=Build%20%28arm_tidy%29 Co-Authored-By: Claude Fable 5 <[email protected]>
…utation-partition-pruning
A single `ALTER TABLE` with several mutation commands is the only place where `getPartitionIdsAffectedByCommands` unions explicit `IN PARTITION` scopes with pruned predicate scopes and intersects the per-command analyzed snapshots, but all existing tests used one command per statement. The new test covers two pruned commands, a mixed explicit/pruned statement, and a pruned command combined with a command that cannot be scoped (which must widen to all partitions), asserting the scope via `system.mutations.block_numbers.partition_id`. Requested by the AI review: #110968 (comment) Co-Authored-By: Claude Fable 5 <[email protected]>
…utation-partition-pruning
Update the `validate_mutation_query` documentation input so CI regenerates the `Setting` enum after this PR starts referencing `Setting::validate_mutation_query`. CI: https://github.com/ClickHouse/ClickHouse/actions/runs/31908710379
…ue-pr-110968-auto-3
Do not prune unresolved subqueries for lightweight updates: their allocated partition block numbers constrain the parts read during execution. #110968
…utation-partition-pruning
…utation-partition-pruning
Contributor
|
Workflow [PR], commit [f764c5a] Summary: ❌
|
Member
Author
|
🕵 Superseded by #115294. The original branch was structurally stacked on unrelated mutation-pruning history; this replacement targets directly with only the intended compatibility fix. |
Member
Author
|
🕵 Correction: the replacement targets master directly with only the intended compatibility fix. |
Contributor
|
Preview deployment for your docs. Learn more about Mintlify Previews.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevent
KeyConditionfrom compilinghas/notHasconstant arrays into set atoms when rawFieldequality differs from conversion to the primary-key type. This avoids incorrect pruning for representable cross-type values such asStringagainstEnum.Related: #109926
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Workflow [PR]
Sync PR [sync-upstream/pr/115233]