diff --git a/go-api/schemapb/schema.pb.go b/go-api/schemapb/schema.pb.go index 65d6e25..46d1ea6 100644 --- a/go-api/schemapb/schema.pb.go +++ b/go-api/schemapb/schema.pb.go @@ -230,12 +230,13 @@ type FieldSchema struct { AutoID bool `protobuf:"varint,8,opt,name=autoID,proto3" json:"autoID,omitempty"` State FieldState `protobuf:"varint,9,opt,name=state,proto3,enum=milvus.proto.schema.FieldState" json:"state,omitempty"` // To keep compatible with older version, the default // state is `Created`. - ElementType DataType `protobuf:"varint,10,opt,name=element_type,json=elementType,proto3,enum=milvus.proto.schema.DataType" json:"element_type,omitempty"` // For array type, the element type is stored here - DefaultValue *ValueField `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` // default_value only support scalars except array and json for now - IsDynamic bool `protobuf:"varint,12,opt,name=is_dynamic,json=isDynamic,proto3" json:"is_dynamic,omitempty"` // mark whether this field is the dynamic field - IsPartitionKey bool `protobuf:"varint,13,opt,name=is_partition_key,json=isPartitionKey,proto3" json:"is_partition_key,omitempty"` // enable logic partitions - IsClusteringKey bool `protobuf:"varint,14,opt,name=is_clustering_key,json=isClusteringKey,proto3" json:"is_clustering_key,omitempty"` - Nullable bool `protobuf:"varint,15,opt,name=nullable,proto3" json:"nullable,omitempty"` // enable set null as field value + ElementType DataType `protobuf:"varint,10,opt,name=element_type,json=elementType,proto3,enum=milvus.proto.schema.DataType" json:"element_type,omitempty"` // For array type, the element type is stored here + DefaultValue *ValueField `protobuf:"bytes,11,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` // default_value only support scalars except array and json for now + IsDynamic bool `protobuf:"varint,12,opt,name=is_dynamic,json=isDynamic,proto3" json:"is_dynamic,omitempty"` // mark whether this field is the dynamic field + IsPartitionKey bool `protobuf:"varint,13,opt,name=is_partition_key,json=isPartitionKey,proto3" json:"is_partition_key,omitempty"` // enable logic partitions + IsClusteringKey bool `protobuf:"varint,14,opt,name=is_clustering_key,json=isClusteringKey,proto3" json:"is_clustering_key,omitempty"` + Nullable bool `protobuf:"varint,15,opt,name=nullable,proto3" json:"nullable,omitempty"` // enable set null as field value + IsFunctionOutput bool `protobuf:"varint,16,opt,name=is_function_output,json=isFunctionOutput,proto3" json:"is_function_output,omitempty"` } func (x *FieldSchema) Reset() { @@ -375,6 +376,13 @@ func (x *FieldSchema) GetNullable() bool { return false } +func (x *FieldSchema) GetIsFunctionOutput() bool { + if x != nil { + return x.IsFunctionOutput + } + return false +} + type FunctionSchema struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -382,12 +390,13 @@ type FunctionSchema struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Id int64 `protobuf:"varint,2,opt,name=id,proto3" json:"id,omitempty"` - Type FunctionType `protobuf:"varint,3,opt,name=type,proto3,enum=milvus.proto.schema.FunctionType" json:"type,omitempty"` - InputFieldNames []string `protobuf:"bytes,4,rep,name=input_field_names,json=inputFieldNames,proto3" json:"input_field_names,omitempty"` - InputFieldIds []int64 `protobuf:"varint,5,rep,packed,name=input_field_ids,json=inputFieldIds,proto3" json:"input_field_ids,omitempty"` - OutputFieldNames []string `protobuf:"bytes,6,rep,name=output_field_names,json=outputFieldNames,proto3" json:"output_field_names,omitempty"` - OutputFieldIds []int64 `protobuf:"varint,7,rep,packed,name=output_field_ids,json=outputFieldIds,proto3" json:"output_field_ids,omitempty"` - Params []*commonpb.KeyValuePair `protobuf:"bytes,8,rep,name=params,proto3" json:"params,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + Type FunctionType `protobuf:"varint,4,opt,name=type,proto3,enum=milvus.proto.schema.FunctionType" json:"type,omitempty"` + InputFieldNames []string `protobuf:"bytes,5,rep,name=input_field_names,json=inputFieldNames,proto3" json:"input_field_names,omitempty"` + InputFieldIds []int64 `protobuf:"varint,6,rep,packed,name=input_field_ids,json=inputFieldIds,proto3" json:"input_field_ids,omitempty"` + OutputFieldNames []string `protobuf:"bytes,7,rep,name=output_field_names,json=outputFieldNames,proto3" json:"output_field_names,omitempty"` + OutputFieldIds []int64 `protobuf:"varint,8,rep,packed,name=output_field_ids,json=outputFieldIds,proto3" json:"output_field_ids,omitempty"` + Params []*commonpb.KeyValuePair `protobuf:"bytes,9,rep,name=params,proto3" json:"params,omitempty"` } func (x *FunctionSchema) Reset() { @@ -436,6 +445,13 @@ func (x *FunctionSchema) GetId() int64 { return 0 } +func (x *FunctionSchema) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + func (x *FunctionSchema) GetType() FunctionType { if x != nil { return x.Type @@ -2019,7 +2035,7 @@ var file_schema_proto_rawDesc = []byte{ 0x65, 0x6d, 0x61, 0x1a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0xb1, 0x05, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x63, 0x68, + 0x6f, 0x74, 0x6f, 0x22, 0xdf, 0x05, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x44, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, @@ -2062,25 +2078,30 @@ var file_schema_proto_rawDesc = []byte{ 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x73, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, - 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x22, 0xd2, 0x02, 0x0a, 0x0e, 0x46, 0x75, 0x6e, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x35, - 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, + 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x5f, 0x66, 0x75, + 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x10, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x73, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x22, 0xf4, 0x02, 0x0a, 0x0e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, + 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x35, + 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x21, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x66, - 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, + 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x6e, 0x70, 0x75, + 0x5f, 0x69, 0x64, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0d, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x74, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x03, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x49, 0x64, - 0x73, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, + 0x73, 0x12, 0x39, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x6d, 0x69, 0x6c, 0x76, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4b, 0x65, 0x79, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x50, 0x61, 0x69, 0x72, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xd6, 0x02, 0x0a, diff --git a/proto/schema.proto b/proto/schema.proto index 5a380f5..f5fdffb 100644 --- a/proto/schema.proto +++ b/proto/schema.proto @@ -71,17 +71,19 @@ message FieldSchema { bool is_partition_key = 13; // enable logic partitions bool is_clustering_key = 14; bool nullable = 15; // enable set null as field value + bool is_function_output =16; } message FunctionSchema { string name = 1; int64 id =2; - FunctionType type = 3; - repeated string input_field_names = 4; - repeated int64 input_field_ids = 5; - repeated string output_field_names = 6; - repeated int64 output_field_ids = 7; - repeated common.KeyValuePair params = 8; + string description = 3; + FunctionType type = 4; + repeated string input_field_names = 5; + repeated int64 input_field_ids = 6; + repeated string output_field_names = 7; + repeated int64 output_field_ids = 8; + repeated common.KeyValuePair params = 9; } /**