Skip to content

Commit e46bf2a

Browse files
use ninja
Signed-off-by: Lloyd-Pottiger <[email protected]>
1 parent f3faf06 commit e46bf2a

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

dbms/src/Storages/DeltaMerge/File/DMFileWithVectorIndexBlockInputStream.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,7 @@ std::tuple<Block, size_t> DMFileWithVectorIndexBlockInputStream::readByIndexRead
170170

171171
auto begin = std::lower_bound(sorted_results.cbegin(), sorted_results.cend(), block_start_row_id);
172172
auto end = std::lower_bound(begin, sorted_results.cend(), index_reader_next_row_id);
173-
const std::span<const VectorIndexViewer::Key> block_selected_rows{
174-
&*begin,
175-
static_cast<size_t>(std::distance(begin, end))};
173+
const std::span block_selected_rows{begin, end};
176174
vec_index_reader->read(vec_column, block_selected_rows, block_start_row_id, read_rows);
177175

178176
block.insert(ColumnWithTypeAndName{std::move(vec_column), vec_cd.type, vec_cd.name, vec_cd.id});
@@ -200,9 +198,7 @@ std::tuple<Block, size_t> DMFileWithVectorIndexBlockInputStream::readByFollowing
200198
// Then read from vector index for the same pack.
201199
auto begin = std::lower_bound(sorted_results.cbegin(), sorted_results.cend(), block_others.startOffset());
202200
auto end = std::lower_bound(begin, sorted_results.cend(), block_others.startOffset() + read_rows);
203-
const std::span<const VectorIndexViewer::Key> block_selected_rows{
204-
&*begin,
205-
static_cast<size_t>(std::distance(begin, end))};
201+
const std::span block_selected_rows{begin, end};
206202
vec_index_reader->read(vec_column, block_selected_rows, block_others.startOffset(), read_rows);
207203

208204
// Re-assemble block using the same layout as header.

dbms/src/Storages/DeltaMerge/Index/VectorIndexHNSW/Index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ std::vector<VectorIndexViewer::SearchResult> VectorIndexHNSWViewer::searchWithDi
343343
{
344344
const auto rowid = result[i].member.key;
345345
if (valid_rows[rowid])
346-
search_results.push_back({rowid, result[i].distance});
346+
search_results.emplace_back(rowid, result[i].distance);
347347
}
348348
return search_results;
349349
}

release-darwin/build/build-release.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export CC="$(brew --prefix)/opt/llvm@17/bin/clang"
3838
export CXX="$(brew --prefix)/opt/llvm@17/bin/clang++"
3939

4040
cmake "$SRCPATH" \
41+
-GNinja \
4142
-DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE \
4243
-DUSE_INTERNAL_SSL_LIBRARY=ON \
4344
-Wno-dev \

release-darwin/prepare-environments/prepare-llvm.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@
1515

1616
set -ueox pipefail
1717

18+
brew install ninja
1819
brew install llvm@17

0 commit comments

Comments
 (0)