Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
Signed-off-by: Lloyd-Pottiger <[email protected]>
  • Loading branch information
Lloyd-Pottiger committed Oct 22, 2024
1 parent 784b891 commit 5e409ea
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ ColumnFileTinyPtr ColumnFileTinyVectorIndexWriter::buildIndexForFile(
auto index_page_id = options.storage_pool->newLogPageId();
MemoryWriteBuffer write_buf;
CompressedWriteBuffer compressed(write_buf);
index_builder->save(compressed);
index_builder->saveToBuffer(compressed);
compressed.next();
auto data_size = write_buf.count();
auto buf = write_buf.tryGetReadBuffer();
Expand Down
2 changes: 1 addition & 1 deletion dbms/src/Storages/DeltaMerge/File/DMFileIndexWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ size_t DMFileIndexWriter::buildIndexForFile(const DMFilePtr & dm_file_mutable, P
? dm_file_mutable->vectorIndexFileName(index_id)
: colIndexFileName(DMFile::getFileNameBase(cd.id, substream_path));
const auto index_path = iw->localPath() + "/" + index_file_name;
index_builder->save(index_path);
index_builder->saveToFile(index_path);

// Memorize what kind of vector index it is, so that we can correctly restore it when reading.
dtpb::VectorIndexFileProps pb_idx;
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Storages/DeltaMerge/Index/VectorIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class VectorIndexBuilder
ProceedCheckFn should_proceed)
= 0;

virtual void save(std::string_view path) const = 0;
virtual void save(WriteBuffer & write_buf) const = 0;
virtual void saveToFile(std::string_view path) const = 0;
virtual void saveToBuffer(WriteBuffer & write_buf) const = 0;

public:
const IndexID index_id;
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Storages/DeltaMerge/Index/VectorIndexHNSW/Index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ void VectorIndexHNSWBuilder::addBlock(
last_reported_memory_usage = current_memory_usage;
}

void VectorIndexHNSWBuilder::save(std::string_view path) const
void VectorIndexHNSWBuilder::saveToFile(std::string_view path) const
{
Stopwatch w;
SCOPE_EXIT({ total_duration += w.elapsedSeconds(); });
Expand All @@ -142,7 +142,7 @@ void VectorIndexHNSWBuilder::save(std::string_view path) const
RUNTIME_CHECK_MSG(result, "Failed to save vector index: {} path={}", result.error.what(), path);
}

void VectorIndexHNSWBuilder::save(WriteBuffer & write_buf) const
void VectorIndexHNSWBuilder::saveToBuffer(WriteBuffer & write_buf) const
{
Stopwatch w;
SCOPE_EXIT({ total_duration += w.elapsedSeconds(); });
Expand Down
4 changes: 2 additions & 2 deletions dbms/src/Storages/DeltaMerge/Index/VectorIndexHNSW/Index.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ class VectorIndexHNSWBuilder : public VectorIndexBuilder

void addBlock(const IColumn & column, const ColumnVector<UInt8> * del_mark, ProceedCheckFn should_proceed) override;

void save(std::string_view path) const override;
void save(WriteBuffer & write_buf) const override;
void saveToFile(std::string_view path) const override;
void saveToBuffer(WriteBuffer & write_buf) const override;

private:
USearchImplType index;
Expand Down

0 comments on commit 5e409ea

Please sign in to comment.