Skip to content

Commit

Permalink
[Cpp] Add Schema function (#79)
Browse files Browse the repository at this point in the history
Signed-off-by: sunby <[email protected]>
  • Loading branch information
sunby committed Oct 18, 2023
1 parent bef9bb3 commit 0c65565
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ go/.vscode/*
go/.idea/*
compile_commands.json
CMakeUserPresets.json
.vscode/*
4 changes: 4 additions & 0 deletions cpp/include/milvus-storage/storage/space.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#pragma once
#include <arrow/record_batch.h>
#include <arrow/type.h>
#include <atomic>
#include <mutex>

#include "storage/manifest.h"
#include "storage/schema.h"
#include "storage/space.h"
#include "file/delete_fragment.h"
namespace milvus_storage {
Expand Down Expand Up @@ -42,6 +44,8 @@ class Space {

std::vector<Blob> StatisticsBlobs();

arrow::Schema Schema();

private:
Status Init();

Expand Down
2 changes: 2 additions & 0 deletions cpp/src/storage/space.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,6 @@ Result<std::shared_ptr<arrow::RecordBatchReader>> Space::ScanData() {
return RecordReader::MakeScanDataReader(manifest_, fs_);
}

arrow::Schema Space::Schema() { return *manifest_->schema()->schema(); }

} // namespace milvus_storage

0 comments on commit 0c65565

Please sign in to comment.