Skip to content

Fix build in the 26.6 backport of #111803 - #116104

Merged
CurtizJ merged 1 commit into
ClickHouse:backport/26.6/111803from
groeneai:fix-115793-build
Aug 24, 2026
Merged

CurtizJ merged 1 commit into
ClickHouse:backport/26.6/111803from
groeneai:fix-115793-build

Conversation

@groeneai

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

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

...

Description

Fixes the build of the 26.6 backport #115793, targeted at its head branch so it can be merged directly.

DictionarySparseIndex::getToken does not exist on 26.6. It was added by 5513d53 ("Decompose tokens in sparse index of text index into chars and bit-packed offsets", 2026-07-05), which is not an ancestor of 26.6. Only the new gtest from the backport references it, so the src/ half of #115793 is fine and the single -Werror failure is:

src/Storages/MergeTree/tests/gtest_posting_list_cursor.cpp:3700:46:
    error: no member named 'getToken' in 'DB::DictionarySparseIndex'

The fix reads the token through the tokens column instead. This is behavior-preserving here: on master getToken returns assert_cast<const ColumnString &>(**tokens_column).getDataAt(idx) for the ColumnPtr arm, and the bit-packed arm only exists with the commit above. On 26.6 deserializeHeader builds the tokens column through deserializeTokensRaw, which returns a ColumnString, so the ColumnPtr arm is the only reachable one. The same idiom is already used twice in this file, for alpha and beta, and both lines predate the backport. The assertion still covers the token round-trip through the V0_Initial header.

Verified by compiling the failing translation unit with the command recorded in compile_commands.json (clang++-21, -Werror): before the patch it fails with the exact CI error at 3700:46, after it there are 0 errors and 0 warnings.

No second missing symbol is hiding behind the first error. All three failing builds report exactly one error: and one FAILED: target, and the ninja run kept going past it to [16660/16696], so the other six touched src/ files compiled.

DictionarySparseIndex::getToken does not exist on this branch. It was added
by 5513d53 ("Decompose tokens in sparse index
of text index into chars and bit-packed offsets"), which is not an ancestor of
26.6, so the new gtest from the backport does not compile here.

On master getToken returns assert_cast<const ColumnString &>(**tokens_column).getDataAt(idx)
for the ColumnPtr arm, and the bit-packed arm only exists with the commit above.
On this branch deserializeHeader builds the tokens column through
deserializeTokensRaw, which returns a ColumnString, so the ColumnPtr arm is the
only reachable one and reading through the tokens column is equivalent. The same
idiom is already used twice in this file, for "alpha" and "beta".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants