mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 12:59:23 +08:00
88f5642603
**What type of PR is this?** - [x] Feature **What this PR does / why we need it:** This PR supports boolean expression as DSL. 1. The goal of this PR is to support predicates like `A > 3 && not B < 5 or C in [1, 2, 3]`. 2. Defines `plan.proto`, as Intermediate Representation (IR) used between go and cpp. 3. Support expr parser, convert predicate expr to IR in proxynode, while doing static check there 4. Support IR to AST in cpp, enable the execution
146 lines
2.8 KiB
Protocol Buffer
146 lines
2.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package milvus.proto.common;
|
|
option go_package="github.com/milvus-io/milvus/internal/proto/commonpb";
|
|
|
|
|
|
enum ErrorCode {
|
|
Success = 0;
|
|
UnexpectedError = 1;
|
|
ConnectFailed = 2;
|
|
PermissionDenied = 3;
|
|
CollectionNotExists = 4;
|
|
IllegalArgument = 5;
|
|
IllegalDimension = 7;
|
|
IllegalIndexType = 8;
|
|
IllegalCollectionName = 9;
|
|
IllegalTOPK = 10;
|
|
IllegalRowRecord = 11;
|
|
IllegalVectorID = 12;
|
|
IllegalSearchResult = 13;
|
|
FileNotFound = 14;
|
|
MetaFailed = 15;
|
|
CacheFailed = 16;
|
|
CannotCreateFolder = 17;
|
|
CannotCreateFile = 18;
|
|
CannotDeleteFolder = 19;
|
|
CannotDeleteFile = 20;
|
|
BuildIndexError = 21;
|
|
IllegalNLIST = 22;
|
|
IllegalMetricType = 23;
|
|
OutOfMemory = 24;
|
|
IndexNotExist = 25;
|
|
|
|
// internal error code.
|
|
DDRequestRace = 1000;
|
|
}
|
|
|
|
enum IndexState {
|
|
IndexStateNone = 0;
|
|
Unissued = 1;
|
|
InProgress = 2;
|
|
Finished = 3;
|
|
Failed = 4;
|
|
}
|
|
|
|
enum SegmentState {
|
|
SegmentStateNone = 0;
|
|
NotExist = 1;
|
|
Growing = 2;
|
|
Sealed = 3;
|
|
Flushed = 4;
|
|
}
|
|
|
|
message Status {
|
|
ErrorCode error_code = 1;
|
|
string reason = 2;
|
|
}
|
|
|
|
message KeyValuePair {
|
|
string key = 1;
|
|
string value = 2;
|
|
}
|
|
|
|
message Blob {
|
|
bytes value = 1;
|
|
}
|
|
|
|
message Address {
|
|
string ip = 1;
|
|
int64 port = 2;
|
|
}
|
|
|
|
enum MsgType {
|
|
Undefined = 0;
|
|
/* DEFINITION REQUESTS: COLLECTION */
|
|
CreateCollection = 100;
|
|
DropCollection = 101;
|
|
HasCollection = 102;
|
|
DescribeCollection = 103;
|
|
ShowCollections = 104;
|
|
GetSystemConfigs = 105;
|
|
LoadCollection = 106;
|
|
ReleaseCollection = 107;
|
|
|
|
/* DEFINITION REQUESTS: PARTITION */
|
|
CreatePartition = 200;
|
|
DropPartition = 201;
|
|
HasPartition = 202;
|
|
DescribePartition = 203;
|
|
ShowPartitions = 204;
|
|
LoadPartitions = 205;
|
|
ReleasePartitions = 206;
|
|
|
|
/* DEFINE REQUESTS: SEGMENT */
|
|
ShowSegments = 250;
|
|
DescribeSegment = 251;
|
|
|
|
/* DEFINITION REQUESTS: INDEX */
|
|
CreateIndex = 300;
|
|
DescribeIndex = 301;
|
|
DropIndex = 302;
|
|
|
|
/* MANIPULATION REQUESTS */
|
|
Insert = 400;
|
|
Delete = 401;
|
|
Flush = 402;
|
|
|
|
/* QUERY */
|
|
Search = 500;
|
|
SearchResult = 501;
|
|
GetIndexState = 502;
|
|
GetIndexBuildProgress = 503;
|
|
GetCollectionStatistics = 504;
|
|
GetPartitionStatistics = 505;
|
|
|
|
/* DATA SERVICE */
|
|
SegmentInfo = 600;
|
|
|
|
/* SYSTEM CONTROL */
|
|
TimeTick = 1200;
|
|
QueryNodeStats = 1201; // GOOSE TODO: Remove kQueryNodeStats
|
|
LoadIndex = 1202;
|
|
RequestID = 1203;
|
|
RequestTSO = 1204;
|
|
AllocateSegment = 1205;
|
|
SegmentStatistics = 1206;
|
|
SegmentFlushDone = 1207;
|
|
}
|
|
|
|
message MsgBase {
|
|
MsgType msg_type = 1;
|
|
int64 msgID = 2;
|
|
uint64 timestamp = 3;
|
|
int64 sourceID = 4;
|
|
}
|
|
|
|
enum DslType {
|
|
Dsl = 0;
|
|
BoolExprV1 = 1;
|
|
}
|
|
|
|
// Don't Modify This. @czs
|
|
message MsgHeader {
|
|
common.MsgBase base = 1;
|
|
}
|