Repository navigation
Enable Implicit Skip Indices for Projections - #105137
Merged
Merged
Conversation
Contributor
|
Workflow [PR], commit [fae0934] Summary: ❌
AI ReviewSummaryThis PR wires implicit projection skip-index materialization through Final Verdict
|
Contributor
LLVM Coverage Report
Changed lines: 92.37% (109/118) | lost baseline coverage: 2 line(s) · Uncovered code |
yariks5s
approved these changes
May 18, 2026
amosbird
added a commit
to amosbird/ClickHouse
that referenced
this pull request
May 19, 2026
…ax indices Address PR ClickHouse#101170 review feedback (CI #2): - Drop the 5 add_minmax_index_for_* members from ProjectionDescription. They were stale ad-hoc fields duplicating MergeTreeSettings; with the new generic SettingsChanges flow the effective MergeTreeSettings is already the canonical representation. - Thread the already-computed effective MergeTreeSettings (defaults from the projection index plus user WITH SETTINGS overrides) into fillProjectionDescription and fillProjectionDescriptionByQuery as a new parameter, instead of reconstructing it. fillProjectionDescriptionByQuery reads the implicit-minmax flags via strongly-typed MergeTreeSetting accessors. - Add the 5 add_minmax_index_for_* names to ALLOWED_PROJECTION_SETTINGS so the feature added in ClickHouse#105137 (Enable Implicit Skip Indices for Projections) keeps working under the new settings flow. The ATTACH validation gap raised by review item #3 is intentionally left as `mode <= LoadingStrictnessLevel::CREATE` to match the project-wide convention (InterpreterCreateQuery, registerStorageMergeTree, etc. all validate user input on CREATE/SECONDARY_CREATE only). The previous loadSettings validated unconditionally because it had no access to mode; now that we do, aligning with the rest of the codebase is the consistent choice.
1 task done
alexey-milovidov
added a commit
that referenced
this pull request
May 20, 2026
… `add_minmax_index_for_numeric_columns` The test from #105137 (added in `8117c54fb8f`) verifies that the `add_minmax_index_for_numeric_columns` setting can be applied per projection via `PROJECTION ... WITH SETTINGS (...)`. Its reference was generated assuming the setting defaults to `0`, so the main table has no auto minmax index and 3 of 3 partitions are read. This PR flips the default to `1`, which adds an implicit minmax index on the main table too. That index now prunes 2 of the 3 partitions before the projection is consulted, shrinking the reported `Parts:` and `Granules:` counts. Explicitly setting `add_minmax_index_for_numeric_columns = 0` on the main table preserves the test's original intent (exercising the projection-level `WITH SETTINGS` override) and makes it robust to future default changes.
DavidHe-2008
pushed a commit
to DavidHe-2008/ClickHouse
that referenced
this pull request
Jun 1, 2026
…ax indices Address PR ClickHouse#101170 review feedback (CI ClickHouse#2): - Drop the 5 add_minmax_index_for_* members from ProjectionDescription. They were stale ad-hoc fields duplicating MergeTreeSettings; with the new generic SettingsChanges flow the effective MergeTreeSettings is already the canonical representation. - Thread the already-computed effective MergeTreeSettings (defaults from the projection index plus user WITH SETTINGS overrides) into fillProjectionDescription and fillProjectionDescriptionByQuery as a new parameter, instead of reconstructing it. fillProjectionDescriptionByQuery reads the implicit-minmax flags via strongly-typed MergeTreeSetting accessors. - Add the 5 add_minmax_index_for_* names to ALLOWED_PROJECTION_SETTINGS so the feature added in ClickHouse#105137 (Enable Implicit Skip Indices for Projections) keeps working under the new settings flow. The ATTACH validation gap raised by review item ClickHouse#3 is intentionally left as `mode <= LoadingStrictnessLevel::CREATE` to match the project-wide convention (InterpreterCreateQuery, registerStorageMergeTree, etc. all validate user input on CREATE/SECONDARY_CREATE only). The previous loadSettings validated unconditionally because it had no access to mode; now that we do, aligning with the rest of the codebase is the consistent choice.
zeekay
pushed a commit
to hanzoai/datastore
that referenced
this pull request
Sep 11, 2026
… `add_minmax_index_for_numeric_columns` The test from ClickHouse#105137 (added in `8117c54fb8f`) verifies that the `add_minmax_index_for_numeric_columns` setting can be applied per projection via `PROJECTION ... WITH SETTINGS (...)`. Its reference was generated assuming the setting defaults to `0`, so the main table has no auto minmax index and 3 of 3 partitions are read. This PR flips the default to `1`, which adds an implicit minmax index on the main table too. That index now prunes 2 of the 3 partitions before the projection is consulted, shrinking the reported `Parts:` and `Granules:` counts. Explicitly setting `add_minmax_index_for_numeric_columns = 0` on the main table preserves the test's original intent (exercising the projection-level `WITH SETTINGS` override) and makes it robust to future default changes.
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.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
This patch enables implicit min-max indices for projections.
Version info
26.5.1.766