From c30593dfa772eb3d8b371511aa956e46c695a414 Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Mon, 18 Nov 2024 16:55:17 +0800 Subject: [PATCH 1/2] *: fix release-8.5 darwin build Signed-off-by: Lloyd-Pottiger --- .../ColumnFile/ColumnFileSetWithVectorIndexInputStream.cpp | 2 +- .../src/Storages/DeltaMerge/ConcatSkippableBlockInputStream.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileSetWithVectorIndexInputStream.cpp b/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileSetWithVectorIndexInputStream.cpp index fe736ef1f99..f27cb1c7f78 100644 --- a/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileSetWithVectorIndexInputStream.cpp +++ b/dbms/src/Storages/DeltaMerge/ColumnFile/ColumnFileSetWithVectorIndexInputStream.cpp @@ -132,7 +132,7 @@ Block ColumnFileSetWithVectorIndexInputStream::readImpl(FilterPtr & res_filter) // read vector type column by vector index auto tiny_reader = tiny_readers[current_file_index]; auto vec_column = vec_cd.type->createColumn(); - const std::span file_selected_rows{selected_row_begin, selected_row_end}; + const std::span file_selected_rows{&*selected_row_begin, selected_rows}; tiny_reader->read(vec_column, file_selected_rows, /* rowid_start_offset= */ read_rows, file_rows); assert(vec_column->size() == file_rows); diff --git a/dbms/src/Storages/DeltaMerge/ConcatSkippableBlockInputStream.cpp b/dbms/src/Storages/DeltaMerge/ConcatSkippableBlockInputStream.cpp index 770ff0392a5..9547df38ff9 100644 --- a/dbms/src/Storages/DeltaMerge/ConcatSkippableBlockInputStream.cpp +++ b/dbms/src/Storages/DeltaMerge/ConcatSkippableBlockInputStream.cpp @@ -231,7 +231,7 @@ void ConcatVectorIndexBlockInputStream::load() for (auto it = begin; it != end; ++it) *it -= precedes_rows; if (auto * index_stream = index_streams[i]; index_stream) - index_stream->setSelectedRows({begin, end}); + index_stream->setSelectedRows({&*begin, static_cast(std::distance(begin, end))}); else RUNTIME_CHECK(begin == end); precedes_rows += stream->rows[i]; From 197d27a68b002dabe63ad45915a95950a7d7e8bb Mon Sep 17 00:00:00 2001 From: Lloyd-Pottiger Date: Tue, 19 Nov 2024 10:22:31 +0800 Subject: [PATCH 2/2] fix ut Signed-off-by: Lloyd-Pottiger --- dbms/src/Functions/tests/gtest_strings_replace.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbms/src/Functions/tests/gtest_strings_replace.cpp b/dbms/src/Functions/tests/gtest_strings_replace.cpp index ad14cbc7be7..7537d1cbcb0 100644 --- a/dbms/src/Functions/tests/gtest_strings_replace.cpp +++ b/dbms/src/Functions/tests/gtest_strings_replace.cpp @@ -220,7 +220,7 @@ try toVec({"你好世好", "你好好界", "你学世界", "习好世界"}), executeFunction( "replaceAll", - createConstColumn(3, "你好世界"), + createConstColumn(4, "你好世界"), toVec({"界", "世", "好", "你"}), toVec({"好", "好", "学", "习"}))); }