Repository navigation
Backport #111803 to 26.6: Added a setting text_index_version for better forward compatibility - #115793
Conversation
…tter forward compatibility
afd38c7 to
17122c2
Compare
|
Workflow [BackportPR], commit [8bdfa70] Summary: ❌
|
|
@groeneai fix build in this backport. |
|
@CurtizJ the build breaks on one line. I have no push access to this repo, so here is the patch: --- a/src/Storages/MergeTree/tests/gtest_posting_list_cursor.cpp
+++ b/src/Storages/MergeTree/tests/gtest_posting_list_cursor.cpp
@@ -3697,7 +3697,7 @@ TEST(PostingListCursorTest, TextIndexHeaderWriteInitialVersionOmitsCodec)
EXPECT_EQ(sparse_index_data.version, MergeTreeTextIndexSerializationVersion::V0_Initial);
EXPECT_EQ(sparse_index_data.codec_type, IPostingListCodec::Type::None);
EXPECT_EQ(sparse_index_data.sparse_index.size(), 1u);
- EXPECT_EQ(sparse_index_data.sparse_index.getToken(0), "gamma");
+ EXPECT_EQ(assert_cast<const ColumnString &>(*sparse_index_data.sparse_index.tokens).getDataAt(0), "gamma");
EXPECT_EQ(sparse_index_data.sparse_index.getOffsetInFile(0), 13u);This is behavior-preserving on this branch. On master Verification: I compiled the failing TU with the command from No second missing symbol is hiding behind the first error. All three failing builds report exactly one |
|
@groeneai fix build in this backport. |
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".
|
@CurtizJ I cannot push to this branch (no push access to this repo, and It is the one-line change from my earlier comment: |
Fix build in the 26.6 backport of #111803
Original pull-request #111803
Cherry-pick pull-request #115612
This pull-request is a last step of an automated backporting.
Treat it as a standard pull-request: look at the checks and resolve conflicts.
Merge it only if you intend to backport changes to the target branch, otherwise just close it.
The PR source
The PR is created in the CI job
Version info
26.6.4.18