Skip to content

Cherry pick #97654 to 25.8: Fix exception in concat with Variant containing LowCardinality#97784

Merged
robot-ch-test-poll2 merged 5 commits intobackport/25.8/97654from
cherrypick/25.8/97654
Feb 23, 2026
Merged

Cherry pick #97654 to 25.8: Fix exception in concat with Variant containing LowCardinality#97784
robot-ch-test-poll2 merged 5 commits intobackport/25.8/97654from
cherrypick/25.8/97654

Conversation

@robot-ch-test-poll2
Copy link
Copy Markdown
Contributor

Original pull-request #97654

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

alexey-milovidov and others added 5 commits February 22, 2026 21:28
The `concat` function's `executeFormatImpl` called `convertToFullIfNeeded`
which, after it was made recursive in #97493, strips `LowCardinality` from
inside compound column types like `Variant`. However, the argument type is
not updated to match, so `SerializationLowCardinality` tries to cast a
non-LC column, triggering a LOGICAL_ERROR exception in debug builds.

Fix by using only top-level column conversions (Const, Sparse, LowCardinality)
instead of the recursive `convertToFullIfNeeded`, keeping the column
structure consistent with the type's serialization.

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=97581&sha=320e7c9d8876b04a971bd26214b9ac0ab433c250&name_0=PR&name_1=AST%20fuzzer%20%28amd_debug%29

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…inality

Fix exception in concat with Variant containing LowCardinality
@robot-ch-test-poll2 robot-ch-test-poll2 added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-critical-bugfix labels Feb 23, 2026
@robot-ch-test-poll2 robot-ch-test-poll2 merged commit 2faf1fb into backport/25.8/97654 Feb 23, 2026
129 of 130 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 deleted the cherrypick/25.8/97654 branch February 23, 2026 18:34
@clickhouse-gh clickhouse-gh bot added the ready-for-backport PR is eligible for backporting (merged 7+ days ago, not reverted) label Mar 27, 2026
@maxknv maxknv removed the ready-for-backport PR is eligible for backporting (merged 7+ days ago, not reverted) label Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! pr-critical-bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants