Skip to content

Commit

Permalink
Add blob file type in schema.proto
Browse files Browse the repository at this point in the history
Signed-off-by: muzhouliu <[email protected]>
  • Loading branch information
mzhl1111 committed Feb 17, 2024
1 parent c57cb8f commit 87b93e7
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions proto/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ enum DataType {
Float16Vector = 102;
BFloat16Vector = 103;
SparseFloatVector = 104;

Blob = 200;
}

enum FieldState {
Expand Down Expand Up @@ -65,6 +67,8 @@ message FieldSchema {
bool is_dynamic = 12; // mark whether this field is the dynamic field
bool is_partition_key = 13; // enable logic partitions
bool is_clustering_key = 14;

bool is_blob_saved = 15; // for blob type, mark if the blob is saved
}

/**
Expand Down Expand Up @@ -100,6 +104,12 @@ message ArrayArray {

message JSONArray { repeated bytes data = 1; }

message BlobFile {
bytes data = 1 ;
string file_name = 2;
string stored_path = 3;
}

message ValueField {
oneof data {
bool bool_data = 1;
Expand Down Expand Up @@ -152,15 +162,22 @@ message VectorField {
}
}

message ExtraField {
oneof data {
BlobFile blob_file = 1;
}
}

message FieldData {
DataType type = 1;
string field_name = 2;
oneof field {
ScalarField scalars = 3;
VectorField vectors = 4;
ExtraField extras = 5;
}
int64 field_id = 5;
bool is_dynamic = 6;
int64 field_id = 6;
bool is_dynamic = 7;
}

message IDs {
Expand Down

0 comments on commit 87b93e7

Please sign in to comment.