Skip to content

Support multiple set index conditions over the same expression - #94515

Merged
alexey-milovidov merged 3 commits into
masterfrom
support-multiple-set-index-conditions-over-the-same-expression
Jan 18, 2026
Merged

alexey-milovidov merged 3 commits into
masterfrom
support-multiple-set-index-conditions-over-the-same-expression

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Jan 18, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Bug Fix (user-visible misbehavior in an official stable release)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

In previous versions, queries with multiple index conditions over the same expression may erroneously throw an exception Not found column. Closes #60660.

Version info

  • Merged into: 26.1.1.641

@clickhouse-gh

clickhouse-gh Bot commented Jan 18, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ec4db716]

Summary: ❌

job_name test_name status info comment
Bugfix validation (functional tests) failure
03797_set_index_multiple_conditions_same_expression FAIL cidb
Check errors failure
BuzzHouse (amd_ubsan) error

@clickhouse-gh clickhouse-gh Bot added the pr-bugfix Pull request with bugfix, not backported by default label Jan 18, 2026
@alexey-milovidov
alexey-milovidov merged commit ccbb491 into master Jan 18, 2026
126 of 128 checks passed
@alexey-milovidov
alexey-milovidov deleted the support-multiple-set-index-conditions-over-the-same-expression branch January 18, 2026 17:53
@alexey-milovidov alexey-milovidov self-assigned this Jan 18, 2026
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jan 18, 2026
@alexey-milovidov alexey-milovidov mentioned this pull request May 10, 2026
1 task done
pull Bot pushed a commit to weiyilai/ClickHouse that referenced this pull request May 11, 2026
The original bug was already fixed in ClickHouse#94515 (closes ClickHouse#60660). This adds
the reproducers from ClickHouse#88558 — multiple index conditions over the same
`arrayConcat(JSONExtractKeys(...), ...)` and `arrayConcat(mapKeys(...), ...)`
expression — as a regression test so the case from the issue is covered
explicitly.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
@robot-ch-test-poll1 robot-ch-test-poll1 added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label May 12, 2026
pull Bot pushed a commit to erickirt/ClickHouse that referenced this pull request May 13, 2026
…ap serialization

The test outputs three `Map(LowCardinality(String), String)` columns with
`SELECT *`. When CI randomizes
`map_serialization_version_for_zero_level_parts = 'with_buckets'` together
with `map_buckets_strategy = 'constant'` and a small
`map_buckets_min_avg_size`, `Map` entries are written to disk grouped by
hash bucket, so the iteration order reflects bucket order rather than
insertion order and the second column (`resource`) prints as
`{'job':'g','d':'e'}` instead of `{'d':'e','job':'g'}`.

Fix by wrapping each `Map` column in `mapSort` so the rendered output is
deterministic regardless of the underlying on-disk format. This is the
same idiomatic fix used in
`04060_coalescing_merge_tree_array_tuple_with_column_param.sql`. The test
still exercises every randomized serialization configuration: only the
`SELECT` output is sorted, the `WHERE` clause and the
`arrayConcat(mapKeys(...))` index path that the test was added to cover
(issue ClickHouse#88558 / PR ClickHouse#94515) are untouched.

CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=104473
@robot-clickhouse-ci-1 robot-clickhouse-ci-1 added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-bugfix Pull request with bugfix, not backported by default pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo v25.12-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multiple predicates on a column with an index causes an exception

5 participants