diff --git a/go-tipb/spfresh.pb.go b/go-tipb/spfresh.pb.go new file mode 100644 index 00000000..d4350d3e --- /dev/null +++ b/go-tipb/spfresh.pb.go @@ -0,0 +1,3638 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: spfresh.proto + +package tipb + +import ( + encoding_binary "encoding/binary" + "fmt" + "io" + "math" + + _ "github.com/gogo/protobuf/gogoproto" + proto "github.com/golang/protobuf/proto" + + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type SPFreshTruncateMode int32 + +const ( + SPFreshTruncateMode_TruncateError SPFreshTruncateMode = 0 + SPFreshTruncateMode_TruncateIgnore SPFreshTruncateMode = 1 + SPFreshTruncateMode_TruncateWarning SPFreshTruncateMode = 2 +) + +var SPFreshTruncateMode_name = map[int32]string{ + 0: "TruncateError", + 1: "TruncateIgnore", + 2: "TruncateWarning", +} + +var SPFreshTruncateMode_value = map[string]int32{ + "TruncateError": 0, + "TruncateIgnore": 1, + "TruncateWarning": 2, +} + +func (x SPFreshTruncateMode) String() string { + return proto.EnumName(SPFreshTruncateMode_name, int32(x)) +} + +func (SPFreshTruncateMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{0} +} + +type SPFreshFilterExprColumnSource int32 + +const ( + SPFreshFilterExprColumnSource_SPFreshFilterExprColumnSourceUnspecified SPFreshFilterExprColumnSource = 0 + SPFreshFilterExprColumnSource_Stored SPFreshFilterExprColumnSource = 1 + SPFreshFilterExprColumnSource_Handle SPFreshFilterExprColumnSource = 2 +) + +var SPFreshFilterExprColumnSource_name = map[int32]string{ + 0: "SPFreshFilterExprColumnSourceUnspecified", + 1: "Stored", + 2: "Handle", +} + +var SPFreshFilterExprColumnSource_value = map[string]int32{ + "SPFreshFilterExprColumnSourceUnspecified": 0, + "Stored": 1, + "Handle": 2, +} + +func (x SPFreshFilterExprColumnSource) String() string { + return proto.EnumName(SPFreshFilterExprColumnSource_name, int32(x)) +} + +func (SPFreshFilterExprColumnSource) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{1} +} + +type SPFreshErrorCode int32 + +const ( + SPFreshErrorCode_SPFreshErrorCodeUnspecified SPFreshErrorCode = 0 + SPFreshErrorCode_SPFreshIndexCorruption SPFreshErrorCode = 9015 + SPFreshErrorCode_SPFreshResponseTooLarge SPFreshErrorCode = 9016 +) + +var SPFreshErrorCode_name = map[int32]string{ + 0: "SPFreshErrorCodeUnspecified", + 9015: "SPFreshIndexCorruption", + 9016: "SPFreshResponseTooLarge", +} + +var SPFreshErrorCode_value = map[string]int32{ + "SPFreshErrorCodeUnspecified": 0, + "SPFreshIndexCorruption": 9015, + "SPFreshResponseTooLarge": 9016, +} + +func (x SPFreshErrorCode) String() string { + return proto.EnumName(SPFreshErrorCode_name, int32(x)) +} + +func (SPFreshErrorCode) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{2} +} + +type SPFreshTeardownRequest struct { + KeyspaceId uint32 `protobuf:"varint,1,opt,name=keyspace_id,json=keyspaceId,proto3" json:"keyspace_id,omitempty"` + TableId int64 `protobuf:"varint,2,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` + IndexId int64 `protobuf:"varint,3,opt,name=index_id,json=indexId,proto3" json:"index_id,omitempty"` +} + +func (m *SPFreshTeardownRequest) Reset() { *m = SPFreshTeardownRequest{} } +func (m *SPFreshTeardownRequest) String() string { return proto.CompactTextString(m) } +func (*SPFreshTeardownRequest) ProtoMessage() {} +func (*SPFreshTeardownRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{0} +} +func (m *SPFreshTeardownRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SPFreshTeardownRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SPFreshTeardownRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SPFreshTeardownRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SPFreshTeardownRequest.Merge(m, src) +} +func (m *SPFreshTeardownRequest) XXX_Size() int { + return m.Size() +} +func (m *SPFreshTeardownRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SPFreshTeardownRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SPFreshTeardownRequest proto.InternalMessageInfo + +func (m *SPFreshTeardownRequest) GetKeyspaceId() uint32 { + if m != nil { + return m.KeyspaceId + } + return 0 +} + +func (m *SPFreshTeardownRequest) GetTableId() int64 { + if m != nil { + return m.TableId + } + return 0 +} + +func (m *SPFreshTeardownRequest) GetIndexId() int64 { + if m != nil { + return m.IndexId + } + return 0 +} + +type SPFreshSearchRequest struct { + KeyspaceId uint32 `protobuf:"varint,1,opt,name=keyspace_id,json=keyspaceId,proto3" json:"keyspace_id,omitempty"` + TableId int64 `protobuf:"varint,2,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` + IndexId int64 `protobuf:"varint,3,opt,name=index_id,json=indexId,proto3" json:"index_id,omitempty"` + StartTs uint64 `protobuf:"varint,4,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"` + TopK uint64 `protobuf:"varint,5,opt,name=top_k,json=topK,proto3" json:"top_k,omitempty"` + // query_vector_f32_le is f32 little-endian bytes, without the dims prefix. + QueryVectorF32Le []byte `protobuf:"bytes,6,opt,name=query_vector_f32_le,json=queryVectorF32Le,proto3" json:"query_vector_f32_le,omitempty"` + RequiredColumns []*ColumnInfo `protobuf:"bytes,7,rep,name=required_columns,json=requiredColumns,proto3" json:"required_columns,omitempty"` + // Optional tuning parameters. + OversampleFactor float64 `protobuf:"fixed64,8,opt,name=oversample_factor,json=oversampleFactor,proto3" json:"oversample_factor,omitempty"` + // If zero, the server uses its default search beam size. + SearchBeamSize uint32 `protobuf:"varint,9,opt,name=search_beam_size,json=searchBeamSize,proto3" json:"search_beam_size,omitempty"` + // read_only disables background fixups (split/merge) triggered by search + // observations. When enabled, the server must not enqueue fixups and should + // avoid starting any background fixup workers. + ReadOnly bool `protobuf:"varint,10,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // When true, the server populates SPFreshSearchRow.distance in each result row. + NeedDistance bool `protobuf:"varint,11,opt,name=need_distance,json=needDistance,proto3" json:"need_distance,omitempty"` + // Optional pushed-down scalar filter expression over the request-visible + // filter schema. ColumnRef values are dense zero-based offsets into + // filter_expr_columns. + FilterExpr *Expr `protobuf:"bytes,12,opt,name=filter_expr,json=filterExpr,proto3" json:"filter_expr,omitempty"` + // Explicit schema mapping for filter_expr ColumnRef offsets. + FilterExprColumns []*SPFreshFilterExprColumn `protobuf:"bytes,13,rep,name=filter_expr_columns,json=filterExprColumns,proto3" json:"filter_expr_columns,omitempty"` + // Mandatory statement evaluation properties when filter_expr is present. + EvalContext *SPFreshEvalContext `protobuf:"bytes,14,opt,name=eval_context,json=evalContext,proto3" json:"eval_context,omitempty"` + // Maximum encoded response size accepted by the client. Endpoints must + // reject zero rather than treating it as an unlimited or default budget. + MaxResponseBytes uint64 `protobuf:"varint,15,opt,name=max_response_bytes,json=maxResponseBytes,proto3" json:"max_response_bytes,omitempty"` +} + +func (m *SPFreshSearchRequest) Reset() { *m = SPFreshSearchRequest{} } +func (m *SPFreshSearchRequest) String() string { return proto.CompactTextString(m) } +func (*SPFreshSearchRequest) ProtoMessage() {} +func (*SPFreshSearchRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{1} +} +func (m *SPFreshSearchRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SPFreshSearchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SPFreshSearchRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SPFreshSearchRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_SPFreshSearchRequest.Merge(m, src) +} +func (m *SPFreshSearchRequest) XXX_Size() int { + return m.Size() +} +func (m *SPFreshSearchRequest) XXX_DiscardUnknown() { + xxx_messageInfo_SPFreshSearchRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_SPFreshSearchRequest proto.InternalMessageInfo + +func (m *SPFreshSearchRequest) GetKeyspaceId() uint32 { + if m != nil { + return m.KeyspaceId + } + return 0 +} + +func (m *SPFreshSearchRequest) GetTableId() int64 { + if m != nil { + return m.TableId + } + return 0 +} + +func (m *SPFreshSearchRequest) GetIndexId() int64 { + if m != nil { + return m.IndexId + } + return 0 +} + +func (m *SPFreshSearchRequest) GetStartTs() uint64 { + if m != nil { + return m.StartTs + } + return 0 +} + +func (m *SPFreshSearchRequest) GetTopK() uint64 { + if m != nil { + return m.TopK + } + return 0 +} + +func (m *SPFreshSearchRequest) GetQueryVectorF32Le() []byte { + if m != nil { + return m.QueryVectorF32Le + } + return nil +} + +func (m *SPFreshSearchRequest) GetRequiredColumns() []*ColumnInfo { + if m != nil { + return m.RequiredColumns + } + return nil +} + +func (m *SPFreshSearchRequest) GetOversampleFactor() float64 { + if m != nil { + return m.OversampleFactor + } + return 0 +} + +func (m *SPFreshSearchRequest) GetSearchBeamSize() uint32 { + if m != nil { + return m.SearchBeamSize + } + return 0 +} + +func (m *SPFreshSearchRequest) GetReadOnly() bool { + if m != nil { + return m.ReadOnly + } + return false +} + +func (m *SPFreshSearchRequest) GetNeedDistance() bool { + if m != nil { + return m.NeedDistance + } + return false +} + +func (m *SPFreshSearchRequest) GetFilterExpr() *Expr { + if m != nil { + return m.FilterExpr + } + return nil +} + +func (m *SPFreshSearchRequest) GetFilterExprColumns() []*SPFreshFilterExprColumn { + if m != nil { + return m.FilterExprColumns + } + return nil +} + +func (m *SPFreshSearchRequest) GetEvalContext() *SPFreshEvalContext { + if m != nil { + return m.EvalContext + } + return nil +} + +func (m *SPFreshSearchRequest) GetMaxResponseBytes() uint64 { + if m != nil { + return m.MaxResponseBytes + } + return 0 +} + +type SPFreshEvalContext struct { + TimeZoneName string `protobuf:"bytes,1,opt,name=time_zone_name,json=timeZoneName,proto3" json:"time_zone_name,omitempty"` + TimeZoneOffset int64 `protobuf:"varint,2,opt,name=time_zone_offset,json=timeZoneOffset,proto3" json:"time_zone_offset,omitempty"` + MaxWarningCount uint64 `protobuf:"varint,3,opt,name=max_warning_count,json=maxWarningCount,proto3" json:"max_warning_count,omitempty"` + DivPrecisionIncrement uint32 `protobuf:"varint,4,opt,name=div_precision_increment,json=divPrecisionIncrement,proto3" json:"div_precision_increment,omitempty"` + TruncateMode SPFreshTruncateMode `protobuf:"varint,5,opt,name=truncate_mode,json=truncateMode,proto3,enum=tipb.SPFreshTruncateMode" json:"truncate_mode,omitempty"` + OverflowAsWarning bool `protobuf:"varint,6,opt,name=overflow_as_warning,json=overflowAsWarning,proto3" json:"overflow_as_warning,omitempty"` + IgnoreZeroInDate bool `protobuf:"varint,11,opt,name=ignore_zero_in_date,json=ignoreZeroInDate,proto3" json:"ignore_zero_in_date,omitempty"` + DividedByZeroAsWarning bool `protobuf:"varint,12,opt,name=divided_by_zero_as_warning,json=dividedByZeroAsWarning,proto3" json:"divided_by_zero_as_warning,omitempty"` + MaxAllowedPacket uint64 `protobuf:"varint,14,opt,name=max_allowed_packet,json=maxAllowedPacket,proto3" json:"max_allowed_packet,omitempty"` + SqlMode uint64 `protobuf:"varint,15,opt,name=sql_mode,json=sqlMode,proto3" json:"sql_mode,omitempty"` +} + +func (m *SPFreshEvalContext) Reset() { *m = SPFreshEvalContext{} } +func (m *SPFreshEvalContext) String() string { return proto.CompactTextString(m) } +func (*SPFreshEvalContext) ProtoMessage() {} +func (*SPFreshEvalContext) Descriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{2} +} +func (m *SPFreshEvalContext) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SPFreshEvalContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SPFreshEvalContext.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SPFreshEvalContext) XXX_Merge(src proto.Message) { + xxx_messageInfo_SPFreshEvalContext.Merge(m, src) +} +func (m *SPFreshEvalContext) XXX_Size() int { + return m.Size() +} +func (m *SPFreshEvalContext) XXX_DiscardUnknown() { + xxx_messageInfo_SPFreshEvalContext.DiscardUnknown(m) +} + +var xxx_messageInfo_SPFreshEvalContext proto.InternalMessageInfo + +func (m *SPFreshEvalContext) GetTimeZoneName() string { + if m != nil { + return m.TimeZoneName + } + return "" +} + +func (m *SPFreshEvalContext) GetTimeZoneOffset() int64 { + if m != nil { + return m.TimeZoneOffset + } + return 0 +} + +func (m *SPFreshEvalContext) GetMaxWarningCount() uint64 { + if m != nil { + return m.MaxWarningCount + } + return 0 +} + +func (m *SPFreshEvalContext) GetDivPrecisionIncrement() uint32 { + if m != nil { + return m.DivPrecisionIncrement + } + return 0 +} + +func (m *SPFreshEvalContext) GetTruncateMode() SPFreshTruncateMode { + if m != nil { + return m.TruncateMode + } + return SPFreshTruncateMode_TruncateError +} + +func (m *SPFreshEvalContext) GetOverflowAsWarning() bool { + if m != nil { + return m.OverflowAsWarning + } + return false +} + +func (m *SPFreshEvalContext) GetIgnoreZeroInDate() bool { + if m != nil { + return m.IgnoreZeroInDate + } + return false +} + +func (m *SPFreshEvalContext) GetDividedByZeroAsWarning() bool { + if m != nil { + return m.DividedByZeroAsWarning + } + return false +} + +func (m *SPFreshEvalContext) GetMaxAllowedPacket() uint64 { + if m != nil { + return m.MaxAllowedPacket + } + return 0 +} + +func (m *SPFreshEvalContext) GetSqlMode() uint64 { + if m != nil { + return m.SqlMode + } + return 0 +} + +type SPFreshFilterExprColumn struct { + ColumnId int64 `protobuf:"varint,1,opt,name=column_id,json=columnId,proto3" json:"column_id,omitempty"` + Source SPFreshFilterExprColumnSource `protobuf:"varint,2,opt,name=source,proto3,enum=tipb.SPFreshFilterExprColumnSource" json:"source,omitempty"` + FieldType *FieldType `protobuf:"bytes,3,opt,name=field_type,json=fieldType,proto3" json:"field_type,omitempty"` +} + +func (m *SPFreshFilterExprColumn) Reset() { *m = SPFreshFilterExprColumn{} } +func (m *SPFreshFilterExprColumn) String() string { return proto.CompactTextString(m) } +func (*SPFreshFilterExprColumn) ProtoMessage() {} +func (*SPFreshFilterExprColumn) Descriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{3} +} +func (m *SPFreshFilterExprColumn) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SPFreshFilterExprColumn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SPFreshFilterExprColumn.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SPFreshFilterExprColumn) XXX_Merge(src proto.Message) { + xxx_messageInfo_SPFreshFilterExprColumn.Merge(m, src) +} +func (m *SPFreshFilterExprColumn) XXX_Size() int { + return m.Size() +} +func (m *SPFreshFilterExprColumn) XXX_DiscardUnknown() { + xxx_messageInfo_SPFreshFilterExprColumn.DiscardUnknown(m) +} + +var xxx_messageInfo_SPFreshFilterExprColumn proto.InternalMessageInfo + +func (m *SPFreshFilterExprColumn) GetColumnId() int64 { + if m != nil { + return m.ColumnId + } + return 0 +} + +func (m *SPFreshFilterExprColumn) GetSource() SPFreshFilterExprColumnSource { + if m != nil { + return m.Source + } + return SPFreshFilterExprColumnSource_SPFreshFilterExprColumnSourceUnspecified +} + +func (m *SPFreshFilterExprColumn) GetFieldType() *FieldType { + if m != nil { + return m.FieldType + } + return nil +} + +type SPFreshSearchResponse struct { + // Types that are valid to be assigned to Result: + // *SPFreshSearchResponse_Success + // *SPFreshSearchResponse_Error + Result isSPFreshSearchResponse_Result `protobuf_oneof:"result"` +} + +func (m *SPFreshSearchResponse) Reset() { *m = SPFreshSearchResponse{} } +func (m *SPFreshSearchResponse) String() string { return proto.CompactTextString(m) } +func (*SPFreshSearchResponse) ProtoMessage() {} +func (*SPFreshSearchResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{4} +} +func (m *SPFreshSearchResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SPFreshSearchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SPFreshSearchResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SPFreshSearchResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_SPFreshSearchResponse.Merge(m, src) +} +func (m *SPFreshSearchResponse) XXX_Size() int { + return m.Size() +} +func (m *SPFreshSearchResponse) XXX_DiscardUnknown() { + xxx_messageInfo_SPFreshSearchResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_SPFreshSearchResponse proto.InternalMessageInfo + +type isSPFreshSearchResponse_Result interface { + isSPFreshSearchResponse_Result() + MarshalTo([]byte) (int, error) + Size() int +} + +type SPFreshSearchResponse_Success struct { + Success *SPFreshSearchResult `protobuf:"bytes,1,opt,name=success,proto3,oneof" json:"success,omitempty"` +} +type SPFreshSearchResponse_Error struct { + Error *Error `protobuf:"bytes,2,opt,name=error,proto3,oneof" json:"error,omitempty"` +} + +func (*SPFreshSearchResponse_Success) isSPFreshSearchResponse_Result() {} +func (*SPFreshSearchResponse_Error) isSPFreshSearchResponse_Result() {} + +func (m *SPFreshSearchResponse) GetResult() isSPFreshSearchResponse_Result { + if m != nil { + return m.Result + } + return nil +} + +func (m *SPFreshSearchResponse) GetSuccess() *SPFreshSearchResult { + if x, ok := m.GetResult().(*SPFreshSearchResponse_Success); ok { + return x.Success + } + return nil +} + +func (m *SPFreshSearchResponse) GetError() *Error { + if x, ok := m.GetResult().(*SPFreshSearchResponse_Error); ok { + return x.Error + } + return nil +} + +// XXX_OneofWrappers is for the internal use of the proto package. +func (*SPFreshSearchResponse) XXX_OneofWrappers() []interface{} { + return []interface{}{ + (*SPFreshSearchResponse_Success)(nil), + (*SPFreshSearchResponse_Error)(nil), + } +} + +type SPFreshSearchResult struct { + Rows []*SPFreshSearchRow `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"` + Stats *SPFreshSearchStats `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"` + Warnings []*Error `protobuf:"bytes,3,rep,name=warnings,proto3" json:"warnings,omitempty"` + WarningCount uint64 `protobuf:"varint,4,opt,name=warning_count,json=warningCount,proto3" json:"warning_count,omitempty"` +} + +func (m *SPFreshSearchResult) Reset() { *m = SPFreshSearchResult{} } +func (m *SPFreshSearchResult) String() string { return proto.CompactTextString(m) } +func (*SPFreshSearchResult) ProtoMessage() {} +func (*SPFreshSearchResult) Descriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{5} +} +func (m *SPFreshSearchResult) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SPFreshSearchResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SPFreshSearchResult.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SPFreshSearchResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_SPFreshSearchResult.Merge(m, src) +} +func (m *SPFreshSearchResult) XXX_Size() int { + return m.Size() +} +func (m *SPFreshSearchResult) XXX_DiscardUnknown() { + xxx_messageInfo_SPFreshSearchResult.DiscardUnknown(m) +} + +var xxx_messageInfo_SPFreshSearchResult proto.InternalMessageInfo + +func (m *SPFreshSearchResult) GetRows() []*SPFreshSearchRow { + if m != nil { + return m.Rows + } + return nil +} + +func (m *SPFreshSearchResult) GetStats() *SPFreshSearchStats { + if m != nil { + return m.Stats + } + return nil +} + +func (m *SPFreshSearchResult) GetWarnings() []*Error { + if m != nil { + return m.Warnings + } + return nil +} + +func (m *SPFreshSearchResult) GetWarningCount() uint64 { + if m != nil { + return m.WarningCount + } + return 0 +} + +type SPFreshSearchRow struct { + HandleBytes []byte `protobuf:"bytes,1,opt,name=handle_bytes,json=handleBytes,proto3" json:"handle_bytes,omitempty"` + Distance float32 `protobuf:"fixed32,2,opt,name=distance,proto3" json:"distance,omitempty"` + ColumnValues [][]byte `protobuf:"bytes,3,rep,name=column_values,json=columnValues,proto3" json:"column_values,omitempty"` +} + +func (m *SPFreshSearchRow) Reset() { *m = SPFreshSearchRow{} } +func (m *SPFreshSearchRow) String() string { return proto.CompactTextString(m) } +func (*SPFreshSearchRow) ProtoMessage() {} +func (*SPFreshSearchRow) Descriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{6} +} +func (m *SPFreshSearchRow) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SPFreshSearchRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SPFreshSearchRow.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SPFreshSearchRow) XXX_Merge(src proto.Message) { + xxx_messageInfo_SPFreshSearchRow.Merge(m, src) +} +func (m *SPFreshSearchRow) XXX_Size() int { + return m.Size() +} +func (m *SPFreshSearchRow) XXX_DiscardUnknown() { + xxx_messageInfo_SPFreshSearchRow.DiscardUnknown(m) +} + +var xxx_messageInfo_SPFreshSearchRow proto.InternalMessageInfo + +func (m *SPFreshSearchRow) GetHandleBytes() []byte { + if m != nil { + return m.HandleBytes + } + return nil +} + +func (m *SPFreshSearchRow) GetDistance() float32 { + if m != nil { + return m.Distance + } + return 0 +} + +func (m *SPFreshSearchRow) GetColumnValues() [][]byte { + if m != nil { + return m.ColumnValues + } + return nil +} + +type SPFreshSearchStats struct { + PartitionsScanned uint64 `protobuf:"varint,1,opt,name=partitions_scanned,json=partitionsScanned,proto3" json:"partitions_scanned,omitempty"` + VectorsScanned uint64 `protobuf:"varint,2,opt,name=vectors_scanned,json=vectorsScanned,proto3" json:"vectors_scanned,omitempty"` + TableLookupKeys uint64 `protobuf:"varint,3,opt,name=table_lookup_keys,json=tableLookupKeys,proto3" json:"table_lookup_keys,omitempty"` + TableLookupBytes uint64 `protobuf:"varint,4,opt,name=table_lookup_bytes,json=tableLookupBytes,proto3" json:"table_lookup_bytes,omitempty"` + // Time costs of each major stage in microseconds. + PermitMicros uint64 `protobuf:"varint,5,opt,name=permit_micros,json=permitMicros,proto3" json:"permit_micros,omitempty"` + ConfigMicros uint64 `protobuf:"varint,6,opt,name=config_micros,json=configMicros,proto3" json:"config_micros,omitempty"` + IndexOpenMicros uint64 `protobuf:"varint,7,opt,name=index_open_micros,json=indexOpenMicros,proto3" json:"index_open_micros,omitempty"` + SearchMicros uint64 `protobuf:"varint,8,opt,name=search_micros,json=searchMicros,proto3" json:"search_micros,omitempty"` + TableLookupMicros uint64 `protobuf:"varint,9,opt,name=table_lookup_micros,json=tableLookupMicros,proto3" json:"table_lookup_micros,omitempty"` + // Aggregated tikv-client RPC stats (best-effort) for this /spfresh_search + // request. + TikvClientRpcCount uint64 `protobuf:"varint,10,opt,name=tikv_client_rpc_count,json=tikvClientRpcCount,proto3" json:"tikv_client_rpc_count,omitempty"` + TikvClientRpcMicros uint64 `protobuf:"varint,11,opt,name=tikv_client_rpc_micros,json=tikvClientRpcMicros,proto3" json:"tikv_client_rpc_micros,omitempty"` + ReadOnly bool `protobuf:"varint,12,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` + // Effective oversample factor used by the server for this request. + OversampleFactor float64 `protobuf:"fixed64,13,opt,name=oversample_factor,json=oversampleFactor,proto3" json:"oversample_factor,omitempty"` + // Process-local partition cache stats for this request. + PartitionCacheHits uint64 `protobuf:"varint,14,opt,name=partition_cache_hits,json=partitionCacheHits,proto3" json:"partition_cache_hits,omitempty"` + PartitionCacheMisses uint64 `protobuf:"varint,15,opt,name=partition_cache_misses,json=partitionCacheMisses,proto3" json:"partition_cache_misses,omitempty"` +} + +func (m *SPFreshSearchStats) Reset() { *m = SPFreshSearchStats{} } +func (m *SPFreshSearchStats) String() string { return proto.CompactTextString(m) } +func (*SPFreshSearchStats) ProtoMessage() {} +func (*SPFreshSearchStats) Descriptor() ([]byte, []int) { + return fileDescriptor_aabe6432836b2ba5, []int{7} +} +func (m *SPFreshSearchStats) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *SPFreshSearchStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_SPFreshSearchStats.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *SPFreshSearchStats) XXX_Merge(src proto.Message) { + xxx_messageInfo_SPFreshSearchStats.Merge(m, src) +} +func (m *SPFreshSearchStats) XXX_Size() int { + return m.Size() +} +func (m *SPFreshSearchStats) XXX_DiscardUnknown() { + xxx_messageInfo_SPFreshSearchStats.DiscardUnknown(m) +} + +var xxx_messageInfo_SPFreshSearchStats proto.InternalMessageInfo + +func (m *SPFreshSearchStats) GetPartitionsScanned() uint64 { + if m != nil { + return m.PartitionsScanned + } + return 0 +} + +func (m *SPFreshSearchStats) GetVectorsScanned() uint64 { + if m != nil { + return m.VectorsScanned + } + return 0 +} + +func (m *SPFreshSearchStats) GetTableLookupKeys() uint64 { + if m != nil { + return m.TableLookupKeys + } + return 0 +} + +func (m *SPFreshSearchStats) GetTableLookupBytes() uint64 { + if m != nil { + return m.TableLookupBytes + } + return 0 +} + +func (m *SPFreshSearchStats) GetPermitMicros() uint64 { + if m != nil { + return m.PermitMicros + } + return 0 +} + +func (m *SPFreshSearchStats) GetConfigMicros() uint64 { + if m != nil { + return m.ConfigMicros + } + return 0 +} + +func (m *SPFreshSearchStats) GetIndexOpenMicros() uint64 { + if m != nil { + return m.IndexOpenMicros + } + return 0 +} + +func (m *SPFreshSearchStats) GetSearchMicros() uint64 { + if m != nil { + return m.SearchMicros + } + return 0 +} + +func (m *SPFreshSearchStats) GetTableLookupMicros() uint64 { + if m != nil { + return m.TableLookupMicros + } + return 0 +} + +func (m *SPFreshSearchStats) GetTikvClientRpcCount() uint64 { + if m != nil { + return m.TikvClientRpcCount + } + return 0 +} + +func (m *SPFreshSearchStats) GetTikvClientRpcMicros() uint64 { + if m != nil { + return m.TikvClientRpcMicros + } + return 0 +} + +func (m *SPFreshSearchStats) GetReadOnly() bool { + if m != nil { + return m.ReadOnly + } + return false +} + +func (m *SPFreshSearchStats) GetOversampleFactor() float64 { + if m != nil { + return m.OversampleFactor + } + return 0 +} + +func (m *SPFreshSearchStats) GetPartitionCacheHits() uint64 { + if m != nil { + return m.PartitionCacheHits + } + return 0 +} + +func (m *SPFreshSearchStats) GetPartitionCacheMisses() uint64 { + if m != nil { + return m.PartitionCacheMisses + } + return 0 +} + +func init() { + proto.RegisterEnum("tipb.SPFreshTruncateMode", SPFreshTruncateMode_name, SPFreshTruncateMode_value) + proto.RegisterEnum("tipb.SPFreshFilterExprColumnSource", SPFreshFilterExprColumnSource_name, SPFreshFilterExprColumnSource_value) + proto.RegisterEnum("tipb.SPFreshErrorCode", SPFreshErrorCode_name, SPFreshErrorCode_value) + proto.RegisterType((*SPFreshTeardownRequest)(nil), "tipb.SPFreshTeardownRequest") + proto.RegisterType((*SPFreshSearchRequest)(nil), "tipb.SPFreshSearchRequest") + proto.RegisterType((*SPFreshEvalContext)(nil), "tipb.SPFreshEvalContext") + proto.RegisterType((*SPFreshFilterExprColumn)(nil), "tipb.SPFreshFilterExprColumn") + proto.RegisterType((*SPFreshSearchResponse)(nil), "tipb.SPFreshSearchResponse") + proto.RegisterType((*SPFreshSearchResult)(nil), "tipb.SPFreshSearchResult") + proto.RegisterType((*SPFreshSearchRow)(nil), "tipb.SPFreshSearchRow") + proto.RegisterType((*SPFreshSearchStats)(nil), "tipb.SPFreshSearchStats") +} + +func init() { proto.RegisterFile("spfresh.proto", fileDescriptor_aabe6432836b2ba5) } + +var fileDescriptor_aabe6432836b2ba5 = []byte{ + // 1514 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x4d, 0x6f, 0x24, 0x39, + 0x19, 0x4e, 0x25, 0x9d, 0xa4, 0xe2, 0xfe, 0xaa, 0xb8, 0x67, 0xb2, 0xbd, 0x19, 0x36, 0xdb, 0xf4, + 0x20, 0x6d, 0x2b, 0xbb, 0xdb, 0x40, 0x0f, 0x20, 0xc1, 0x48, 0x48, 0x9b, 0xec, 0x46, 0xd3, 0xd9, + 0x19, 0x66, 0x70, 0xc2, 0x22, 0xed, 0xc5, 0x72, 0xaa, 0xde, 0x4e, 0xac, 0x54, 0xd9, 0x15, 0xdb, + 0xdd, 0x49, 0x8f, 0xc4, 0x0f, 0xe0, 0xc6, 0x91, 0x3b, 0x17, 0x24, 0x7e, 0x00, 0xdc, 0xb8, 0x72, + 0xdc, 0xe3, 0x1e, 0xd1, 0xcc, 0x91, 0x3f, 0x81, 0x6c, 0x57, 0xf5, 0x17, 0x99, 0xb9, 0x71, 0x2b, + 0x3f, 0xcf, 0xf3, 0xfa, 0xb5, 0x5f, 0xbf, 0x1f, 0x85, 0xea, 0x3a, 0x1f, 0x29, 0xd0, 0x57, 0xfd, + 0x5c, 0x49, 0x23, 0x71, 0xc5, 0xf0, 0xfc, 0x62, 0x3f, 0x82, 0xbb, 0x5c, 0x81, 0xd6, 0x5c, 0x0a, + 0x8f, 0xef, 0xd7, 0x74, 0x7c, 0x05, 0x19, 0x9b, 0xad, 0x20, 0x85, 0xd8, 0x14, 0xab, 0x07, 0x97, + 0xf2, 0x52, 0xba, 0xcf, 0x1f, 0xdb, 0xaf, 0x02, 0x6d, 0xaa, 0xb1, 0x36, 0xee, 0xd3, 0x03, 0x5d, + 0x89, 0xf6, 0xce, 0x5e, 0x9d, 0x58, 0x5f, 0xe7, 0xc0, 0x54, 0x22, 0x6f, 0x05, 0x81, 0x9b, 0x31, + 0x68, 0x83, 0x3f, 0x46, 0xd5, 0x6b, 0x98, 0xea, 0x9c, 0xc5, 0x40, 0x79, 0xd2, 0x0e, 0x3a, 0x41, + 0xaf, 0x4e, 0x50, 0x09, 0x0d, 0x13, 0xfc, 0x21, 0x0a, 0x0d, 0xbb, 0x48, 0x1d, 0xbb, 0xde, 0x09, + 0x7a, 0x1b, 0x64, 0xdb, 0xad, 0x3d, 0xc5, 0x45, 0x02, 0x77, 0x96, 0xda, 0xf0, 0x94, 0x5b, 0x0f, + 0x93, 0xee, 0x1f, 0x37, 0xd1, 0x83, 0xc2, 0xe3, 0x19, 0x30, 0x15, 0x5f, 0xfd, 0x7f, 0xfd, 0x59, + 0x4a, 0x1b, 0xa6, 0x0c, 0x35, 0xba, 0x5d, 0xe9, 0x04, 0xbd, 0x0a, 0xd9, 0x76, 0xeb, 0x73, 0x8d, + 0x5b, 0x68, 0xd3, 0xc8, 0x9c, 0x5e, 0xb7, 0x37, 0x1d, 0x5e, 0x31, 0x32, 0xff, 0x1a, 0x7f, 0x8e, + 0x5a, 0x37, 0x63, 0x50, 0x53, 0x3a, 0x81, 0xd8, 0x48, 0x45, 0x47, 0x4f, 0x06, 0x34, 0x85, 0xf6, + 0x56, 0x27, 0xe8, 0xd5, 0x48, 0xe4, 0xa8, 0x6f, 0x1c, 0x73, 0xf2, 0x64, 0xf0, 0x1c, 0xf0, 0x53, + 0x14, 0x29, 0xb8, 0x19, 0x73, 0x05, 0x09, 0x8d, 0x65, 0x3a, 0xce, 0x84, 0x6e, 0x6f, 0x77, 0x36, + 0x7a, 0xd5, 0x41, 0xd4, 0xb7, 0xaf, 0xd6, 0x3f, 0x76, 0xe0, 0x50, 0x8c, 0x24, 0x69, 0x96, 0x4a, + 0x8f, 0x69, 0xfc, 0x29, 0xda, 0x95, 0x13, 0x50, 0x9a, 0x65, 0x79, 0x0a, 0x74, 0xc4, 0xec, 0xb6, + 0xed, 0xb0, 0x13, 0xf4, 0x02, 0x12, 0xcd, 0x89, 0x13, 0x87, 0xe3, 0x1e, 0x8a, 0xb4, 0x0b, 0x18, + 0xbd, 0x00, 0x96, 0x51, 0xcd, 0x5f, 0x43, 0x7b, 0xc7, 0x05, 0xa9, 0xe1, 0xf1, 0x23, 0x60, 0xd9, + 0x19, 0x7f, 0x0d, 0xf8, 0x11, 0xda, 0x51, 0xc0, 0x12, 0x2a, 0x45, 0x3a, 0x6d, 0xa3, 0x4e, 0xd0, + 0x0b, 0x49, 0x68, 0x81, 0x97, 0x22, 0x9d, 0xe2, 0xc7, 0xa8, 0x2e, 0x00, 0x12, 0x9a, 0x70, 0x6d, + 0x98, 0x88, 0xa1, 0x5d, 0x75, 0x82, 0x9a, 0x05, 0xbf, 0x2c, 0x30, 0xfc, 0x29, 0xaa, 0x8e, 0x78, + 0x6a, 0x40, 0x51, 0x9b, 0x73, 0xed, 0x5a, 0x27, 0xe8, 0x55, 0x07, 0xc8, 0x5f, 0xe8, 0xab, 0xbb, + 0x5c, 0x11, 0xe4, 0x69, 0xfb, 0x8d, 0x5f, 0xa0, 0xd6, 0x82, 0x78, 0x16, 0x85, 0xba, 0x8b, 0xc2, + 0x47, 0xde, 0xa8, 0x78, 0xf1, 0x93, 0x99, 0x95, 0x0f, 0x01, 0xd9, 0x1d, 0xad, 0x20, 0x1a, 0x3f, + 0x45, 0x35, 0x98, 0xb0, 0x94, 0xc6, 0x52, 0x18, 0xb8, 0x33, 0xed, 0x86, 0x73, 0xde, 0x5e, 0xda, + 0xe7, 0xab, 0x09, 0x4b, 0x8f, 0x3d, 0x4f, 0xaa, 0x30, 0x5f, 0xe0, 0xcf, 0x10, 0xce, 0xd8, 0x1d, + 0x55, 0xa0, 0x73, 0x29, 0x34, 0xd0, 0x8b, 0xa9, 0x01, 0xdd, 0x6e, 0xba, 0xf7, 0x8d, 0x32, 0x76, + 0x47, 0x0a, 0xe2, 0xc8, 0xe2, 0xdd, 0xff, 0x54, 0x10, 0xfe, 0xdf, 0x1d, 0xf1, 0x8f, 0x50, 0xc3, + 0xf0, 0x0c, 0xe8, 0x6b, 0x29, 0x80, 0x0a, 0x96, 0x81, 0x4b, 0xc6, 0x1d, 0x52, 0xb3, 0xe8, 0xb7, + 0x52, 0xc0, 0x6f, 0x58, 0x06, 0xf6, 0x3d, 0xe6, 0x2a, 0x39, 0x1a, 0x69, 0x30, 0x45, 0x5a, 0x36, + 0x4a, 0xdd, 0x4b, 0x87, 0xe2, 0x43, 0xb4, 0x6b, 0x0f, 0x75, 0xcb, 0x94, 0xe0, 0xe2, 0x92, 0xc6, + 0x72, 0x2c, 0x8c, 0x4b, 0xd3, 0x0a, 0x69, 0x66, 0xec, 0xee, 0xf7, 0x1e, 0x3f, 0xb6, 0x30, 0xfe, + 0x05, 0xfa, 0x20, 0xe1, 0x13, 0x9a, 0x2b, 0x88, 0xb9, 0xad, 0x74, 0xca, 0x45, 0xac, 0x20, 0x03, + 0x61, 0x5c, 0xf6, 0xd6, 0xc9, 0xc3, 0x84, 0x4f, 0x5e, 0x95, 0xec, 0xb0, 0x24, 0xf1, 0xaf, 0x51, + 0xdd, 0xa8, 0xb1, 0x88, 0x99, 0x01, 0x9a, 0xc9, 0x04, 0x5c, 0x4e, 0x37, 0x06, 0x1f, 0x2e, 0x85, + 0xed, 0xbc, 0x50, 0xbc, 0x90, 0x09, 0x90, 0x9a, 0x59, 0x58, 0xe1, 0x3e, 0x6a, 0xd9, 0x8c, 0x1b, + 0xa5, 0xf2, 0x96, 0x32, 0x5d, 0x9e, 0xd5, 0xa5, 0x7d, 0x48, 0x76, 0x4b, 0xea, 0x0b, 0x5d, 0x1c, + 0xd6, 0x96, 0x09, 0xbf, 0x14, 0x52, 0x01, 0x7d, 0x0d, 0x4a, 0x52, 0x2e, 0x68, 0xc2, 0x4c, 0x99, + 0x4c, 0x91, 0xa7, 0xbe, 0x05, 0x25, 0x87, 0xe2, 0x4b, 0x66, 0x00, 0xff, 0x0a, 0xed, 0x27, 0x7c, + 0xc2, 0x13, 0x48, 0xe8, 0xc5, 0xd4, 0x9b, 0x2c, 0x78, 0xa9, 0x39, 0xab, 0xbd, 0x42, 0x71, 0x34, + 0xb5, 0x86, 0x73, 0x57, 0xc5, 0x9b, 0xb2, 0x34, 0x95, 0xb7, 0x90, 0xd0, 0x9c, 0xc5, 0xd7, 0xe0, + 0xd3, 0xc2, 0xbf, 0xe9, 0x17, 0x9e, 0x78, 0xe5, 0x70, 0x57, 0xef, 0x37, 0xa9, 0x8f, 0x41, 0xb3, + 0xa8, 0xf7, 0x9b, 0xd4, 0xde, 0xf1, 0xb4, 0x12, 0x6e, 0x47, 0xe1, 0x69, 0x25, 0x0c, 0xa3, 0x9d, + 0xd3, 0x4a, 0xb8, 0x13, 0xa1, 0xd3, 0x4a, 0x88, 0xa2, 0xea, 0x69, 0x25, 0xac, 0x47, 0x0d, 0xd2, + 0x14, 0x72, 0xe9, 0x2e, 0xa4, 0x56, 0x02, 0x6e, 0xd5, 0x72, 0xfe, 0x29, 0x17, 0x13, 0x96, 0xf2, + 0xc4, 0x61, 0x9a, 0x34, 0xb5, 0x51, 0x3c, 0x36, 0xb4, 0xf4, 0x48, 0xf6, 0x41, 0x29, 0xdb, 0x34, + 0xa4, 0xa2, 0xf6, 0x36, 0xee, 0x05, 0x8b, 0x0b, 0x77, 0xff, 0x12, 0xa0, 0x0f, 0xde, 0x51, 0x07, + 0xb6, 0x64, 0x7d, 0xdd, 0x94, 0xad, 0x6f, 0x83, 0x84, 0x1e, 0x18, 0x26, 0xf8, 0x29, 0xda, 0xd2, + 0x72, 0xac, 0x62, 0x70, 0xf9, 0xd5, 0x18, 0x3c, 0x7e, 0x6f, 0x4d, 0x9d, 0x39, 0x29, 0x29, 0x4c, + 0x70, 0x1f, 0xa1, 0x11, 0x87, 0x34, 0xa1, 0x66, 0x9a, 0x83, 0xcb, 0xba, 0xea, 0xa0, 0xe9, 0x37, + 0x38, 0xb1, 0xf8, 0xf9, 0x34, 0x07, 0xb2, 0x33, 0x2a, 0x3f, 0xbb, 0x7f, 0x40, 0x0f, 0x57, 0xda, + 0xb3, 0xaf, 0x18, 0xfc, 0x73, 0xb4, 0xad, 0xc7, 0x71, 0x0c, 0x5a, 0xbb, 0x03, 0x56, 0x57, 0x72, + 0x6b, 0xa6, 0x1e, 0xa7, 0xe6, 0xd9, 0x1a, 0x29, 0xb5, 0xf8, 0x31, 0xda, 0x74, 0x31, 0x71, 0x67, + 0xaf, 0x0e, 0xaa, 0x45, 0x13, 0xb1, 0xd0, 0xb3, 0x35, 0xe2, 0xb9, 0xa3, 0x10, 0x6d, 0x29, 0x67, + 0xd9, 0xfd, 0x67, 0x80, 0x5a, 0xf7, 0xec, 0x88, 0x0f, 0x51, 0x45, 0xc9, 0x5b, 0xeb, 0xda, 0x76, + 0x95, 0xbd, 0xfb, 0x5c, 0xcb, 0x5b, 0xe2, 0x34, 0xb8, 0x8f, 0x36, 0xb5, 0x61, 0x46, 0x17, 0x2e, + 0xdb, 0xf7, 0x88, 0xcf, 0x2c, 0x4f, 0xbc, 0x0c, 0x7f, 0x82, 0xc2, 0x22, 0x13, 0x75, 0x7b, 0xc3, + 0xed, 0xbf, 0x78, 0x4a, 0x32, 0x23, 0x6d, 0xef, 0x5c, 0x2e, 0x62, 0x3f, 0x50, 0x6a, 0xb7, 0x0b, + 0x15, 0xdc, 0x9d, 0xa0, 0x68, 0xf5, 0x5c, 0xf8, 0x87, 0xa8, 0x76, 0xc5, 0x44, 0x92, 0x96, 0x0d, + 0x29, 0x70, 0xd3, 0xa4, 0xea, 0x31, 0xd7, 0x8b, 0xf0, 0x3e, 0x0a, 0x67, 0x2d, 0xd9, 0x9e, 0x7b, + 0x9d, 0xcc, 0xd6, 0xd6, 0x6f, 0x91, 0x1d, 0x13, 0x96, 0x8e, 0xc1, 0x9f, 0xb2, 0x46, 0x6a, 0x1e, + 0xfc, 0xc6, 0x61, 0xdd, 0xbf, 0x6d, 0xce, 0x9a, 0xd9, 0xc2, 0x1d, 0xf1, 0xe7, 0x08, 0xe7, 0x4c, + 0x19, 0x6e, 0xb8, 0x14, 0x9a, 0xea, 0x98, 0x09, 0x01, 0x3e, 0xc5, 0x2a, 0x64, 0x77, 0xce, 0x9c, + 0x79, 0x02, 0x7f, 0x82, 0x9a, 0x7e, 0xf0, 0xcd, 0xb5, 0xeb, 0x4e, 0xdb, 0x28, 0xe0, 0x52, 0x78, + 0x88, 0x76, 0xfd, 0x34, 0x4e, 0xa5, 0xbc, 0x1e, 0xe7, 0xd4, 0x0e, 0xea, 0xb2, 0xa9, 0x39, 0xe2, + 0xb9, 0xc3, 0xbf, 0x86, 0xa9, 0xb6, 0x15, 0xbc, 0xa4, 0xf5, 0x41, 0xf0, 0xc1, 0x8b, 0x16, 0xc4, + 0x3e, 0x12, 0x8f, 0x51, 0x3d, 0x07, 0x95, 0x71, 0x43, 0x33, 0x1e, 0x2b, 0xa9, 0x8b, 0xf1, 0x5c, + 0xf3, 0xe0, 0x0b, 0x87, 0xf9, 0x90, 0x88, 0x11, 0xbf, 0x2c, 0x45, 0x5b, 0x5e, 0xe4, 0xc1, 0x42, + 0x74, 0x88, 0x76, 0xfd, 0x6f, 0x81, 0xcc, 0x41, 0x94, 0xc2, 0x6d, 0x7f, 0x46, 0x47, 0xbc, 0xcc, + 0x41, 0xcc, 0x37, 0x2c, 0xc6, 0x6b, 0xa1, 0x0b, 0xfd, 0x86, 0x1e, 0x2c, 0x44, 0x7d, 0xd4, 0x5a, + 0xba, 0x48, 0x21, 0xdd, 0xf1, 0xd1, 0x5c, 0xb8, 0x49, 0xa1, 0xff, 0x29, 0x7a, 0x68, 0xf8, 0xf5, + 0x84, 0xc6, 0x29, 0x07, 0x61, 0xa8, 0xca, 0xe3, 0x22, 0x71, 0x90, 0xb3, 0xc0, 0x96, 0x3c, 0x76, + 0x1c, 0xc9, 0x63, 0x3f, 0x00, 0x9e, 0xa0, 0xbd, 0x55, 0x93, 0xc2, 0x4b, 0xd5, 0xd9, 0xb4, 0x96, + 0x6c, 0x0a, 0x3f, 0x4b, 0x13, 0xbf, 0xb6, 0x32, 0xf1, 0xef, 0xfd, 0xcb, 0xa8, 0xbf, 0xe3, 0x2f, + 0xe3, 0x27, 0xe8, 0xc1, 0x2c, 0x29, 0x68, 0xcc, 0xe2, 0x2b, 0xa0, 0x57, 0xdc, 0xe8, 0xa2, 0xdd, + 0xce, 0x53, 0xe9, 0xd8, 0x52, 0xcf, 0xb8, 0xd1, 0xf8, 0x67, 0x68, 0x6f, 0xd5, 0x22, 0xe3, 0x5a, + 0xcf, 0xc6, 0xee, 0x83, 0x65, 0x9b, 0x17, 0x8e, 0x3b, 0xfc, 0xed, 0xac, 0xcc, 0x17, 0x87, 0x12, + 0xde, 0x45, 0xf5, 0x72, 0xed, 0x8a, 0x2f, 0x5a, 0xc3, 0x18, 0x35, 0x4a, 0x68, 0xe8, 0xc6, 0x4a, + 0x14, 0xe0, 0x16, 0x6a, 0x96, 0x58, 0x31, 0x25, 0xa2, 0xf5, 0x43, 0x40, 0x1f, 0xbd, 0xb7, 0x25, + 0xe2, 0xcf, 0x50, 0xef, 0xbd, 0x82, 0xdf, 0x09, 0x9d, 0x43, 0xcc, 0x47, 0x1c, 0x92, 0x68, 0x0d, + 0x23, 0xb4, 0x75, 0x66, 0xa4, 0x82, 0x24, 0x0a, 0xec, 0xf7, 0x33, 0x57, 0xab, 0xd1, 0xfa, 0xa1, + 0x98, 0xd5, 0xb7, 0x3b, 0xe1, 0xb1, 0x3d, 0xf6, 0xc7, 0xe8, 0xd1, 0x2a, 0xb6, 0xbc, 0xd9, 0xa3, + 0xd9, 0x6f, 0xf6, 0xd0, 0xe6, 0xdd, 0xb1, 0x54, 0x6a, 0x9c, 0xdb, 0x98, 0x44, 0x7f, 0x3f, 0xc1, + 0x3f, 0x98, 0xcd, 0x85, 0xb2, 0xd9, 0x9e, 0x4b, 0xf9, 0x9c, 0xa9, 0x4b, 0x88, 0xfe, 0x71, 0x72, + 0xf4, 0xcb, 0xef, 0xff, 0x1a, 0x06, 0xff, 0x7a, 0x73, 0x10, 0x7c, 0xf7, 0xe6, 0x20, 0xf8, 0xf7, + 0x9b, 0x83, 0xe0, 0x4f, 0x6f, 0x0f, 0xd6, 0xfe, 0xfc, 0xf6, 0x60, 0xed, 0xbb, 0xb7, 0x07, 0x6b, + 0xdf, 0xbf, 0x3d, 0x58, 0x43, 0x0f, 0x63, 0x99, 0xf5, 0x73, 0x2e, 0x2e, 0x63, 0x96, 0xf7, 0x0d, + 0x4f, 0x2e, 0x5c, 0xf7, 0x7a, 0x15, 0x5c, 0x6c, 0xb9, 0x7f, 0xfc, 0x27, 0xff, 0x0d, 0x00, 0x00, + 0xff, 0xff, 0x74, 0xee, 0xde, 0xb4, 0x4f, 0x0c, 0x00, 0x00, +} + +func (m *SPFreshTeardownRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SPFreshTeardownRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshTeardownRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IndexId != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.IndexId)) + i-- + dAtA[i] = 0x18 + } + if m.TableId != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TableId)) + i-- + dAtA[i] = 0x10 + } + if m.KeyspaceId != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.KeyspaceId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SPFreshSearchRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SPFreshSearchRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshSearchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.MaxResponseBytes != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.MaxResponseBytes)) + i-- + dAtA[i] = 0x78 + } + if m.EvalContext != nil { + { + size, err := m.EvalContext.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x72 + } + if len(m.FilterExprColumns) > 0 { + for iNdEx := len(m.FilterExprColumns) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.FilterExprColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x6a + } + } + if m.FilterExpr != nil { + { + size, err := m.FilterExpr.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x62 + } + if m.NeedDistance { + i-- + if m.NeedDistance { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.ReadOnly { + i-- + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x50 + } + if m.SearchBeamSize != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.SearchBeamSize)) + i-- + dAtA[i] = 0x48 + } + if m.OversampleFactor != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OversampleFactor)))) + i-- + dAtA[i] = 0x41 + } + if len(m.RequiredColumns) > 0 { + for iNdEx := len(m.RequiredColumns) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RequiredColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.QueryVectorF32Le) > 0 { + i -= len(m.QueryVectorF32Le) + copy(dAtA[i:], m.QueryVectorF32Le) + i = encodeVarintSpfresh(dAtA, i, uint64(len(m.QueryVectorF32Le))) + i-- + dAtA[i] = 0x32 + } + if m.TopK != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TopK)) + i-- + dAtA[i] = 0x28 + } + if m.StartTs != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.StartTs)) + i-- + dAtA[i] = 0x20 + } + if m.IndexId != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.IndexId)) + i-- + dAtA[i] = 0x18 + } + if m.TableId != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TableId)) + i-- + dAtA[i] = 0x10 + } + if m.KeyspaceId != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.KeyspaceId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SPFreshEvalContext) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SPFreshEvalContext) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshEvalContext) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SqlMode != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.SqlMode)) + i-- + dAtA[i] = 0x78 + } + if m.MaxAllowedPacket != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.MaxAllowedPacket)) + i-- + dAtA[i] = 0x70 + } + if m.DividedByZeroAsWarning { + i-- + if m.DividedByZeroAsWarning { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.IgnoreZeroInDate { + i-- + if m.IgnoreZeroInDate { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if m.OverflowAsWarning { + i-- + if m.OverflowAsWarning { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.TruncateMode != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TruncateMode)) + i-- + dAtA[i] = 0x28 + } + if m.DivPrecisionIncrement != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.DivPrecisionIncrement)) + i-- + dAtA[i] = 0x20 + } + if m.MaxWarningCount != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.MaxWarningCount)) + i-- + dAtA[i] = 0x18 + } + if m.TimeZoneOffset != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TimeZoneOffset)) + i-- + dAtA[i] = 0x10 + } + if len(m.TimeZoneName) > 0 { + i -= len(m.TimeZoneName) + copy(dAtA[i:], m.TimeZoneName) + i = encodeVarintSpfresh(dAtA, i, uint64(len(m.TimeZoneName))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SPFreshFilterExprColumn) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SPFreshFilterExprColumn) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshFilterExprColumn) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FieldType != nil { + { + size, err := m.FieldType.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if m.Source != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.Source)) + i-- + dAtA[i] = 0x10 + } + if m.ColumnId != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.ColumnId)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *SPFreshSearchResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SPFreshSearchResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshSearchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Result != nil { + { + size := m.Result.Size() + i -= size + if _, err := m.Result.MarshalTo(dAtA[i:]); err != nil { + return 0, err + } + } + } + return len(dAtA) - i, nil +} + +func (m *SPFreshSearchResponse_Success) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshSearchResponse_Success) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Success != nil { + { + size, err := m.Success.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} +func (m *SPFreshSearchResponse_Error) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshSearchResponse_Error) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.Error != nil { + { + size, err := m.Error.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + return len(dAtA) - i, nil +} +func (m *SPFreshSearchResult) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SPFreshSearchResult) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshSearchResult) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.WarningCount != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.WarningCount)) + i-- + dAtA[i] = 0x20 + } + if len(m.Warnings) > 0 { + for iNdEx := len(m.Warnings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Warnings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if m.Stats != nil { + { + size, err := m.Stats.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Rows) > 0 { + for iNdEx := len(m.Rows) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Rows[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintSpfresh(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *SPFreshSearchRow) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SPFreshSearchRow) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshSearchRow) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ColumnValues) > 0 { + for iNdEx := len(m.ColumnValues) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ColumnValues[iNdEx]) + copy(dAtA[i:], m.ColumnValues[iNdEx]) + i = encodeVarintSpfresh(dAtA, i, uint64(len(m.ColumnValues[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if m.Distance != 0 { + i -= 4 + encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Distance)))) + i-- + dAtA[i] = 0x15 + } + if len(m.HandleBytes) > 0 { + i -= len(m.HandleBytes) + copy(dAtA[i:], m.HandleBytes) + i = encodeVarintSpfresh(dAtA, i, uint64(len(m.HandleBytes))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *SPFreshSearchStats) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SPFreshSearchStats) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *SPFreshSearchStats) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.PartitionCacheMisses != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.PartitionCacheMisses)) + i-- + dAtA[i] = 0x78 + } + if m.PartitionCacheHits != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.PartitionCacheHits)) + i-- + dAtA[i] = 0x70 + } + if m.OversampleFactor != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OversampleFactor)))) + i-- + dAtA[i] = 0x69 + } + if m.ReadOnly { + i-- + if m.ReadOnly { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x60 + } + if m.TikvClientRpcMicros != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TikvClientRpcMicros)) + i-- + dAtA[i] = 0x58 + } + if m.TikvClientRpcCount != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TikvClientRpcCount)) + i-- + dAtA[i] = 0x50 + } + if m.TableLookupMicros != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TableLookupMicros)) + i-- + dAtA[i] = 0x48 + } + if m.SearchMicros != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.SearchMicros)) + i-- + dAtA[i] = 0x40 + } + if m.IndexOpenMicros != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.IndexOpenMicros)) + i-- + dAtA[i] = 0x38 + } + if m.ConfigMicros != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.ConfigMicros)) + i-- + dAtA[i] = 0x30 + } + if m.PermitMicros != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.PermitMicros)) + i-- + dAtA[i] = 0x28 + } + if m.TableLookupBytes != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TableLookupBytes)) + i-- + dAtA[i] = 0x20 + } + if m.TableLookupKeys != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.TableLookupKeys)) + i-- + dAtA[i] = 0x18 + } + if m.VectorsScanned != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.VectorsScanned)) + i-- + dAtA[i] = 0x10 + } + if m.PartitionsScanned != 0 { + i = encodeVarintSpfresh(dAtA, i, uint64(m.PartitionsScanned)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintSpfresh(dAtA []byte, offset int, v uint64) int { + offset -= sovSpfresh(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *SPFreshTeardownRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.KeyspaceId != 0 { + n += 1 + sovSpfresh(uint64(m.KeyspaceId)) + } + if m.TableId != 0 { + n += 1 + sovSpfresh(uint64(m.TableId)) + } + if m.IndexId != 0 { + n += 1 + sovSpfresh(uint64(m.IndexId)) + } + return n +} + +func (m *SPFreshSearchRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.KeyspaceId != 0 { + n += 1 + sovSpfresh(uint64(m.KeyspaceId)) + } + if m.TableId != 0 { + n += 1 + sovSpfresh(uint64(m.TableId)) + } + if m.IndexId != 0 { + n += 1 + sovSpfresh(uint64(m.IndexId)) + } + if m.StartTs != 0 { + n += 1 + sovSpfresh(uint64(m.StartTs)) + } + if m.TopK != 0 { + n += 1 + sovSpfresh(uint64(m.TopK)) + } + l = len(m.QueryVectorF32Le) + if l > 0 { + n += 1 + l + sovSpfresh(uint64(l)) + } + if len(m.RequiredColumns) > 0 { + for _, e := range m.RequiredColumns { + l = e.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + } + if m.OversampleFactor != 0 { + n += 9 + } + if m.SearchBeamSize != 0 { + n += 1 + sovSpfresh(uint64(m.SearchBeamSize)) + } + if m.ReadOnly { + n += 2 + } + if m.NeedDistance { + n += 2 + } + if m.FilterExpr != nil { + l = m.FilterExpr.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + if len(m.FilterExprColumns) > 0 { + for _, e := range m.FilterExprColumns { + l = e.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + } + if m.EvalContext != nil { + l = m.EvalContext.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + if m.MaxResponseBytes != 0 { + n += 1 + sovSpfresh(uint64(m.MaxResponseBytes)) + } + return n +} + +func (m *SPFreshEvalContext) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.TimeZoneName) + if l > 0 { + n += 1 + l + sovSpfresh(uint64(l)) + } + if m.TimeZoneOffset != 0 { + n += 1 + sovSpfresh(uint64(m.TimeZoneOffset)) + } + if m.MaxWarningCount != 0 { + n += 1 + sovSpfresh(uint64(m.MaxWarningCount)) + } + if m.DivPrecisionIncrement != 0 { + n += 1 + sovSpfresh(uint64(m.DivPrecisionIncrement)) + } + if m.TruncateMode != 0 { + n += 1 + sovSpfresh(uint64(m.TruncateMode)) + } + if m.OverflowAsWarning { + n += 2 + } + if m.IgnoreZeroInDate { + n += 2 + } + if m.DividedByZeroAsWarning { + n += 2 + } + if m.MaxAllowedPacket != 0 { + n += 1 + sovSpfresh(uint64(m.MaxAllowedPacket)) + } + if m.SqlMode != 0 { + n += 1 + sovSpfresh(uint64(m.SqlMode)) + } + return n +} + +func (m *SPFreshFilterExprColumn) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ColumnId != 0 { + n += 1 + sovSpfresh(uint64(m.ColumnId)) + } + if m.Source != 0 { + n += 1 + sovSpfresh(uint64(m.Source)) + } + if m.FieldType != nil { + l = m.FieldType.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + return n +} + +func (m *SPFreshSearchResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Result != nil { + n += m.Result.Size() + } + return n +} + +func (m *SPFreshSearchResponse_Success) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Success != nil { + l = m.Success.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + return n +} +func (m *SPFreshSearchResponse_Error) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Error != nil { + l = m.Error.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + return n +} +func (m *SPFreshSearchResult) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Rows) > 0 { + for _, e := range m.Rows { + l = e.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + } + if m.Stats != nil { + l = m.Stats.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + if len(m.Warnings) > 0 { + for _, e := range m.Warnings { + l = e.Size() + n += 1 + l + sovSpfresh(uint64(l)) + } + } + if m.WarningCount != 0 { + n += 1 + sovSpfresh(uint64(m.WarningCount)) + } + return n +} + +func (m *SPFreshSearchRow) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.HandleBytes) + if l > 0 { + n += 1 + l + sovSpfresh(uint64(l)) + } + if m.Distance != 0 { + n += 5 + } + if len(m.ColumnValues) > 0 { + for _, b := range m.ColumnValues { + l = len(b) + n += 1 + l + sovSpfresh(uint64(l)) + } + } + return n +} + +func (m *SPFreshSearchStats) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.PartitionsScanned != 0 { + n += 1 + sovSpfresh(uint64(m.PartitionsScanned)) + } + if m.VectorsScanned != 0 { + n += 1 + sovSpfresh(uint64(m.VectorsScanned)) + } + if m.TableLookupKeys != 0 { + n += 1 + sovSpfresh(uint64(m.TableLookupKeys)) + } + if m.TableLookupBytes != 0 { + n += 1 + sovSpfresh(uint64(m.TableLookupBytes)) + } + if m.PermitMicros != 0 { + n += 1 + sovSpfresh(uint64(m.PermitMicros)) + } + if m.ConfigMicros != 0 { + n += 1 + sovSpfresh(uint64(m.ConfigMicros)) + } + if m.IndexOpenMicros != 0 { + n += 1 + sovSpfresh(uint64(m.IndexOpenMicros)) + } + if m.SearchMicros != 0 { + n += 1 + sovSpfresh(uint64(m.SearchMicros)) + } + if m.TableLookupMicros != 0 { + n += 1 + sovSpfresh(uint64(m.TableLookupMicros)) + } + if m.TikvClientRpcCount != 0 { + n += 1 + sovSpfresh(uint64(m.TikvClientRpcCount)) + } + if m.TikvClientRpcMicros != 0 { + n += 1 + sovSpfresh(uint64(m.TikvClientRpcMicros)) + } + if m.ReadOnly { + n += 2 + } + if m.OversampleFactor != 0 { + n += 9 + } + if m.PartitionCacheHits != 0 { + n += 1 + sovSpfresh(uint64(m.PartitionCacheHits)) + } + if m.PartitionCacheMisses != 0 { + n += 1 + sovSpfresh(uint64(m.PartitionCacheMisses)) + } + return n +} + +func sovSpfresh(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozSpfresh(x uint64) (n int) { + return sovSpfresh(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *SPFreshTeardownRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SPFreshTeardownRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SPFreshTeardownRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyspaceId", wireType) + } + m.KeyspaceId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeyspaceId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TableId", wireType) + } + m.TableId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TableId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IndexId", wireType) + } + m.IndexId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IndexId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSpfresh(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSpfresh + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SPFreshSearchRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SPFreshSearchRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SPFreshSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyspaceId", wireType) + } + m.KeyspaceId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.KeyspaceId |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TableId", wireType) + } + m.TableId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TableId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IndexId", wireType) + } + m.IndexId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IndexId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StartTs", wireType) + } + m.StartTs = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.StartTs |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TopK", wireType) + } + m.TopK = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TopK |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QueryVectorF32Le", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QueryVectorF32Le = append(m.QueryVectorF32Le[:0], dAtA[iNdEx:postIndex]...) + if m.QueryVectorF32Le == nil { + m.QueryVectorF32Le = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RequiredColumns", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RequiredColumns = append(m.RequiredColumns, &ColumnInfo{}) + if err := m.RequiredColumns[len(m.RequiredColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field OversampleFactor", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.OversampleFactor = float64(math.Float64frombits(v)) + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchBeamSize", wireType) + } + m.SearchBeamSize = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SearchBeamSize |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NeedDistance", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.NeedDistance = bool(v != 0) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FilterExpr", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FilterExpr == nil { + m.FilterExpr = &Expr{} + } + if err := m.FilterExpr.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FilterExprColumns", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FilterExprColumns = append(m.FilterExprColumns, &SPFreshFilterExprColumn{}) + if err := m.FilterExprColumns[len(m.FilterExprColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EvalContext", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EvalContext == nil { + m.EvalContext = &SPFreshEvalContext{} + } + if err := m.EvalContext.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxResponseBytes", wireType) + } + m.MaxResponseBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxResponseBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSpfresh(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSpfresh + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SPFreshEvalContext) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SPFreshEvalContext: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SPFreshEvalContext: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeZoneName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TimeZoneName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeZoneOffset", wireType) + } + m.TimeZoneOffset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TimeZoneOffset |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxWarningCount", wireType) + } + m.MaxWarningCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxWarningCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DivPrecisionIncrement", wireType) + } + m.DivPrecisionIncrement = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.DivPrecisionIncrement |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TruncateMode", wireType) + } + m.TruncateMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TruncateMode |= SPFreshTruncateMode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OverflowAsWarning", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.OverflowAsWarning = bool(v != 0) + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IgnoreZeroInDate", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IgnoreZeroInDate = bool(v != 0) + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DividedByZeroAsWarning", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.DividedByZeroAsWarning = bool(v != 0) + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxAllowedPacket", wireType) + } + m.MaxAllowedPacket = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.MaxAllowedPacket |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SqlMode", wireType) + } + m.SqlMode = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SqlMode |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSpfresh(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSpfresh + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SPFreshFilterExprColumn) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SPFreshFilterExprColumn: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SPFreshFilterExprColumn: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ColumnId", wireType) + } + m.ColumnId = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ColumnId |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + m.Source = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Source |= SPFreshFilterExprColumnSource(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldType", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FieldType == nil { + m.FieldType = &FieldType{} + } + if err := m.FieldType.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSpfresh(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSpfresh + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SPFreshSearchResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SPFreshSearchResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SPFreshSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &SPFreshSearchResult{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Result = &SPFreshSearchResponse_Success{v} + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &Error{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Result = &SPFreshSearchResponse_Error{v} + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSpfresh(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSpfresh + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SPFreshSearchResult) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SPFreshSearchResult: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SPFreshSearchResult: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rows", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rows = append(m.Rows, &SPFreshSearchRow{}) + if err := m.Rows[len(m.Rows)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Stats == nil { + m.Stats = &SPFreshSearchStats{} + } + if err := m.Stats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Warnings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Warnings = append(m.Warnings, &Error{}) + if err := m.Warnings[len(m.Warnings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field WarningCount", wireType) + } + m.WarningCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.WarningCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSpfresh(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSpfresh + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SPFreshSearchRow) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SPFreshSearchRow: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SPFreshSearchRow: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HandleBytes", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.HandleBytes = append(m.HandleBytes[:0], dAtA[iNdEx:postIndex]...) + if m.HandleBytes == nil { + m.HandleBytes = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 5 { + return fmt.Errorf("proto: wrong wireType = %d for field Distance", wireType) + } + var v uint32 + if (iNdEx + 4) > l { + return io.ErrUnexpectedEOF + } + v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) + iNdEx += 4 + m.Distance = float32(math.Float32frombits(v)) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ColumnValues", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthSpfresh + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthSpfresh + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ColumnValues = append(m.ColumnValues, make([]byte, postIndex-iNdEx)) + copy(m.ColumnValues[len(m.ColumnValues)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipSpfresh(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSpfresh + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SPFreshSearchStats) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SPFreshSearchStats: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SPFreshSearchStats: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartitionsScanned", wireType) + } + m.PartitionsScanned = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PartitionsScanned |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field VectorsScanned", wireType) + } + m.VectorsScanned = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.VectorsScanned |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TableLookupKeys", wireType) + } + m.TableLookupKeys = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TableLookupKeys |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TableLookupBytes", wireType) + } + m.TableLookupBytes = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TableLookupBytes |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PermitMicros", wireType) + } + m.PermitMicros = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PermitMicros |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConfigMicros", wireType) + } + m.ConfigMicros = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ConfigMicros |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IndexOpenMicros", wireType) + } + m.IndexOpenMicros = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IndexOpenMicros |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SearchMicros", wireType) + } + m.SearchMicros = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SearchMicros |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TableLookupMicros", wireType) + } + m.TableLookupMicros = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TableLookupMicros |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TikvClientRpcCount", wireType) + } + m.TikvClientRpcCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TikvClientRpcCount |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TikvClientRpcMicros", wireType) + } + m.TikvClientRpcMicros = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TikvClientRpcMicros |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.ReadOnly = bool(v != 0) + case 13: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field OversampleFactor", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.OversampleFactor = float64(math.Float64frombits(v)) + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartitionCacheHits", wireType) + } + m.PartitionCacheHits = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PartitionCacheHits |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PartitionCacheMisses", wireType) + } + m.PartitionCacheMisses = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowSpfresh + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.PartitionCacheMisses |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipSpfresh(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthSpfresh + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipSpfresh(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSpfresh + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSpfresh + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowSpfresh + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthSpfresh + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupSpfresh + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthSpfresh + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthSpfresh = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowSpfresh = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupSpfresh = fmt.Errorf("proto: unexpected end of group") +) diff --git a/go-tipb/spfresh_search.pb.go b/go-tipb/spfresh_search.pb.go deleted file mode 100644 index 0e86ea83..00000000 --- a/go-tipb/spfresh_search.pb.go +++ /dev/null @@ -1,1894 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: spfresh_search.proto - -package tipb - -import ( - encoding_binary "encoding/binary" - "fmt" - "io" - "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type SPFreshSearchRequest struct { - KeyspaceId uint32 `protobuf:"varint,1,opt,name=keyspace_id,json=keyspaceId,proto3" json:"keyspace_id,omitempty"` - TableId int64 `protobuf:"varint,2,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` - IndexId int64 `protobuf:"varint,3,opt,name=index_id,json=indexId,proto3" json:"index_id,omitempty"` - StartTs uint64 `protobuf:"varint,4,opt,name=start_ts,json=startTs,proto3" json:"start_ts,omitempty"` - TopK uint64 `protobuf:"varint,5,opt,name=top_k,json=topK,proto3" json:"top_k,omitempty"` - // query_vector_f32_le is f32 little-endian bytes, without the dims prefix. - QueryVectorF32Le []byte `protobuf:"bytes,6,opt,name=query_vector_f32_le,json=queryVectorF32Le,proto3" json:"query_vector_f32_le,omitempty"` - RequiredColumns []*ColumnInfo `protobuf:"bytes,7,rep,name=required_columns,json=requiredColumns,proto3" json:"required_columns,omitempty"` - // Optional tuning parameters. - OversampleFactor float64 `protobuf:"fixed64,8,opt,name=oversample_factor,json=oversampleFactor,proto3" json:"oversample_factor,omitempty"` - // If zero, the server uses its default search beam size. - SearchBeamSize uint32 `protobuf:"varint,9,opt,name=search_beam_size,json=searchBeamSize,proto3" json:"search_beam_size,omitempty"` - // read_only disables background fixups (split/merge) triggered by search - // observations. When enabled, the server must not enqueue fixups and should - // avoid starting any background fixup workers. - ReadOnly bool `protobuf:"varint,10,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` - // When true, the server populates SPFreshSearchRow.distance in each result row. - NeedDistance bool `protobuf:"varint,11,opt,name=need_distance,json=needDistance,proto3" json:"need_distance,omitempty"` -} - -func (m *SPFreshSearchRequest) Reset() { *m = SPFreshSearchRequest{} } -func (m *SPFreshSearchRequest) String() string { return proto.CompactTextString(m) } -func (*SPFreshSearchRequest) ProtoMessage() {} -func (*SPFreshSearchRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_f72e9c11973690fb, []int{0} -} -func (m *SPFreshSearchRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SPFreshSearchRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SPFreshSearchRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SPFreshSearchRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SPFreshSearchRequest.Merge(m, src) -} -func (m *SPFreshSearchRequest) XXX_Size() int { - return m.Size() -} -func (m *SPFreshSearchRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SPFreshSearchRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SPFreshSearchRequest proto.InternalMessageInfo - -func (m *SPFreshSearchRequest) GetKeyspaceId() uint32 { - if m != nil { - return m.KeyspaceId - } - return 0 -} - -func (m *SPFreshSearchRequest) GetTableId() int64 { - if m != nil { - return m.TableId - } - return 0 -} - -func (m *SPFreshSearchRequest) GetIndexId() int64 { - if m != nil { - return m.IndexId - } - return 0 -} - -func (m *SPFreshSearchRequest) GetStartTs() uint64 { - if m != nil { - return m.StartTs - } - return 0 -} - -func (m *SPFreshSearchRequest) GetTopK() uint64 { - if m != nil { - return m.TopK - } - return 0 -} - -func (m *SPFreshSearchRequest) GetQueryVectorF32Le() []byte { - if m != nil { - return m.QueryVectorF32Le - } - return nil -} - -func (m *SPFreshSearchRequest) GetRequiredColumns() []*ColumnInfo { - if m != nil { - return m.RequiredColumns - } - return nil -} - -func (m *SPFreshSearchRequest) GetOversampleFactor() float64 { - if m != nil { - return m.OversampleFactor - } - return 0 -} - -func (m *SPFreshSearchRequest) GetSearchBeamSize() uint32 { - if m != nil { - return m.SearchBeamSize - } - return 0 -} - -func (m *SPFreshSearchRequest) GetReadOnly() bool { - if m != nil { - return m.ReadOnly - } - return false -} - -func (m *SPFreshSearchRequest) GetNeedDistance() bool { - if m != nil { - return m.NeedDistance - } - return false -} - -type SPFreshSearchResponse struct { - Rows []*SPFreshSearchRow `protobuf:"bytes,1,rep,name=rows,proto3" json:"rows,omitempty"` - Stats *SPFreshSearchStats `protobuf:"bytes,2,opt,name=stats,proto3" json:"stats,omitempty"` -} - -func (m *SPFreshSearchResponse) Reset() { *m = SPFreshSearchResponse{} } -func (m *SPFreshSearchResponse) String() string { return proto.CompactTextString(m) } -func (*SPFreshSearchResponse) ProtoMessage() {} -func (*SPFreshSearchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_f72e9c11973690fb, []int{1} -} -func (m *SPFreshSearchResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SPFreshSearchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SPFreshSearchResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SPFreshSearchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SPFreshSearchResponse.Merge(m, src) -} -func (m *SPFreshSearchResponse) XXX_Size() int { - return m.Size() -} -func (m *SPFreshSearchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SPFreshSearchResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SPFreshSearchResponse proto.InternalMessageInfo - -func (m *SPFreshSearchResponse) GetRows() []*SPFreshSearchRow { - if m != nil { - return m.Rows - } - return nil -} - -func (m *SPFreshSearchResponse) GetStats() *SPFreshSearchStats { - if m != nil { - return m.Stats - } - return nil -} - -type SPFreshSearchRow struct { - HandleBytes []byte `protobuf:"bytes,1,opt,name=handle_bytes,json=handleBytes,proto3" json:"handle_bytes,omitempty"` - Distance float32 `protobuf:"fixed32,2,opt,name=distance,proto3" json:"distance,omitempty"` - ColumnValues [][]byte `protobuf:"bytes,3,rep,name=column_values,json=columnValues,proto3" json:"column_values,omitempty"` -} - -func (m *SPFreshSearchRow) Reset() { *m = SPFreshSearchRow{} } -func (m *SPFreshSearchRow) String() string { return proto.CompactTextString(m) } -func (*SPFreshSearchRow) ProtoMessage() {} -func (*SPFreshSearchRow) Descriptor() ([]byte, []int) { - return fileDescriptor_f72e9c11973690fb, []int{2} -} -func (m *SPFreshSearchRow) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SPFreshSearchRow) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SPFreshSearchRow.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SPFreshSearchRow) XXX_Merge(src proto.Message) { - xxx_messageInfo_SPFreshSearchRow.Merge(m, src) -} -func (m *SPFreshSearchRow) XXX_Size() int { - return m.Size() -} -func (m *SPFreshSearchRow) XXX_DiscardUnknown() { - xxx_messageInfo_SPFreshSearchRow.DiscardUnknown(m) -} - -var xxx_messageInfo_SPFreshSearchRow proto.InternalMessageInfo - -func (m *SPFreshSearchRow) GetHandleBytes() []byte { - if m != nil { - return m.HandleBytes - } - return nil -} - -func (m *SPFreshSearchRow) GetDistance() float32 { - if m != nil { - return m.Distance - } - return 0 -} - -func (m *SPFreshSearchRow) GetColumnValues() [][]byte { - if m != nil { - return m.ColumnValues - } - return nil -} - -type SPFreshSearchStats struct { - PartitionsScanned uint64 `protobuf:"varint,1,opt,name=partitions_scanned,json=partitionsScanned,proto3" json:"partitions_scanned,omitempty"` - VectorsScanned uint64 `protobuf:"varint,2,opt,name=vectors_scanned,json=vectorsScanned,proto3" json:"vectors_scanned,omitempty"` - TableLookupKeys uint64 `protobuf:"varint,3,opt,name=table_lookup_keys,json=tableLookupKeys,proto3" json:"table_lookup_keys,omitempty"` - TableLookupBytes uint64 `protobuf:"varint,4,opt,name=table_lookup_bytes,json=tableLookupBytes,proto3" json:"table_lookup_bytes,omitempty"` - // Time costs of each major stage in microseconds. - PermitMicros uint64 `protobuf:"varint,5,opt,name=permit_micros,json=permitMicros,proto3" json:"permit_micros,omitempty"` - ConfigMicros uint64 `protobuf:"varint,6,opt,name=config_micros,json=configMicros,proto3" json:"config_micros,omitempty"` - IndexOpenMicros uint64 `protobuf:"varint,7,opt,name=index_open_micros,json=indexOpenMicros,proto3" json:"index_open_micros,omitempty"` - SearchMicros uint64 `protobuf:"varint,8,opt,name=search_micros,json=searchMicros,proto3" json:"search_micros,omitempty"` - TableLookupMicros uint64 `protobuf:"varint,9,opt,name=table_lookup_micros,json=tableLookupMicros,proto3" json:"table_lookup_micros,omitempty"` - // Aggregated tikv-client RPC stats (best-effort) for this /spfresh_search - // request. - TikvClientRpcCount uint64 `protobuf:"varint,10,opt,name=tikv_client_rpc_count,json=tikvClientRpcCount,proto3" json:"tikv_client_rpc_count,omitempty"` - TikvClientRpcMicros uint64 `protobuf:"varint,11,opt,name=tikv_client_rpc_micros,json=tikvClientRpcMicros,proto3" json:"tikv_client_rpc_micros,omitempty"` - ReadOnly bool `protobuf:"varint,12,opt,name=read_only,json=readOnly,proto3" json:"read_only,omitempty"` - // Effective oversample factor used by the server for this request. - OversampleFactor float64 `protobuf:"fixed64,13,opt,name=oversample_factor,json=oversampleFactor,proto3" json:"oversample_factor,omitempty"` - // Process-local partition cache stats for this request. - PartitionCacheHits uint64 `protobuf:"varint,14,opt,name=partition_cache_hits,json=partitionCacheHits,proto3" json:"partition_cache_hits,omitempty"` - PartitionCacheMisses uint64 `protobuf:"varint,15,opt,name=partition_cache_misses,json=partitionCacheMisses,proto3" json:"partition_cache_misses,omitempty"` -} - -func (m *SPFreshSearchStats) Reset() { *m = SPFreshSearchStats{} } -func (m *SPFreshSearchStats) String() string { return proto.CompactTextString(m) } -func (*SPFreshSearchStats) ProtoMessage() {} -func (*SPFreshSearchStats) Descriptor() ([]byte, []int) { - return fileDescriptor_f72e9c11973690fb, []int{3} -} -func (m *SPFreshSearchStats) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SPFreshSearchStats) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SPFreshSearchStats.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SPFreshSearchStats) XXX_Merge(src proto.Message) { - xxx_messageInfo_SPFreshSearchStats.Merge(m, src) -} -func (m *SPFreshSearchStats) XXX_Size() int { - return m.Size() -} -func (m *SPFreshSearchStats) XXX_DiscardUnknown() { - xxx_messageInfo_SPFreshSearchStats.DiscardUnknown(m) -} - -var xxx_messageInfo_SPFreshSearchStats proto.InternalMessageInfo - -func (m *SPFreshSearchStats) GetPartitionsScanned() uint64 { - if m != nil { - return m.PartitionsScanned - } - return 0 -} - -func (m *SPFreshSearchStats) GetVectorsScanned() uint64 { - if m != nil { - return m.VectorsScanned - } - return 0 -} - -func (m *SPFreshSearchStats) GetTableLookupKeys() uint64 { - if m != nil { - return m.TableLookupKeys - } - return 0 -} - -func (m *SPFreshSearchStats) GetTableLookupBytes() uint64 { - if m != nil { - return m.TableLookupBytes - } - return 0 -} - -func (m *SPFreshSearchStats) GetPermitMicros() uint64 { - if m != nil { - return m.PermitMicros - } - return 0 -} - -func (m *SPFreshSearchStats) GetConfigMicros() uint64 { - if m != nil { - return m.ConfigMicros - } - return 0 -} - -func (m *SPFreshSearchStats) GetIndexOpenMicros() uint64 { - if m != nil { - return m.IndexOpenMicros - } - return 0 -} - -func (m *SPFreshSearchStats) GetSearchMicros() uint64 { - if m != nil { - return m.SearchMicros - } - return 0 -} - -func (m *SPFreshSearchStats) GetTableLookupMicros() uint64 { - if m != nil { - return m.TableLookupMicros - } - return 0 -} - -func (m *SPFreshSearchStats) GetTikvClientRpcCount() uint64 { - if m != nil { - return m.TikvClientRpcCount - } - return 0 -} - -func (m *SPFreshSearchStats) GetTikvClientRpcMicros() uint64 { - if m != nil { - return m.TikvClientRpcMicros - } - return 0 -} - -func (m *SPFreshSearchStats) GetReadOnly() bool { - if m != nil { - return m.ReadOnly - } - return false -} - -func (m *SPFreshSearchStats) GetOversampleFactor() float64 { - if m != nil { - return m.OversampleFactor - } - return 0 -} - -func (m *SPFreshSearchStats) GetPartitionCacheHits() uint64 { - if m != nil { - return m.PartitionCacheHits - } - return 0 -} - -func (m *SPFreshSearchStats) GetPartitionCacheMisses() uint64 { - if m != nil { - return m.PartitionCacheMisses - } - return 0 -} - -func init() { - proto.RegisterType((*SPFreshSearchRequest)(nil), "tipb.SPFreshSearchRequest") - proto.RegisterType((*SPFreshSearchResponse)(nil), "tipb.SPFreshSearchResponse") - proto.RegisterType((*SPFreshSearchRow)(nil), "tipb.SPFreshSearchRow") - proto.RegisterType((*SPFreshSearchStats)(nil), "tipb.SPFreshSearchStats") -} - -func init() { proto.RegisterFile("spfresh_search.proto", fileDescriptor_f72e9c11973690fb) } - -var fileDescriptor_f72e9c11973690fb = []byte{ - // 803 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0x41, 0x6f, 0xdb, 0x36, - 0x14, 0xc7, 0xa3, 0xd8, 0x49, 0x1c, 0x5a, 0x89, 0x1d, 0xc6, 0x09, 0xb4, 0x0c, 0xf0, 0xbc, 0xf4, - 0x30, 0x21, 0x5b, 0xbd, 0x2d, 0xd9, 0x65, 0xd8, 0x2d, 0x19, 0x82, 0x15, 0x6d, 0xd1, 0x82, 0x1e, - 0x7a, 0x25, 0x68, 0xe9, 0x39, 0x26, 0x22, 0x91, 0x8c, 0x48, 0xb9, 0x73, 0x3f, 0xc5, 0x8e, 0x3b, - 0xef, 0x34, 0x60, 0x5f, 0x64, 0xc7, 0x1e, 0x7b, 0x1c, 0x92, 0x2f, 0x32, 0xe8, 0x51, 0x4e, 0x6a, - 0x2f, 0xbd, 0x89, 0xbf, 0xff, 0xff, 0x3d, 0xe9, 0x3d, 0xbe, 0x27, 0xd2, 0xb3, 0x66, 0x52, 0x80, - 0x9d, 0x72, 0x0b, 0xa2, 0x48, 0xa6, 0x43, 0x53, 0x68, 0xa7, 0x69, 0xd3, 0x49, 0x33, 0x3e, 0x0a, - 0x6d, 0x32, 0x85, 0x5c, 0x78, 0x76, 0xd4, 0xbb, 0xd2, 0x57, 0x1a, 0x1f, 0xbf, 0xad, 0x9e, 0x6a, - 0xda, 0x29, 0x4a, 0xeb, 0xf0, 0xd1, 0x83, 0xe3, 0x3f, 0x1b, 0xa4, 0x37, 0x7a, 0x7d, 0x59, 0xe5, - 0x1c, 0x61, 0x4a, 0x06, 0x37, 0x25, 0x58, 0x47, 0xbf, 0x20, 0xed, 0x6b, 0x98, 0x5b, 0x23, 0x12, - 0xe0, 0x32, 0x8d, 0x82, 0x41, 0x10, 0xef, 0x30, 0xb2, 0x40, 0xcf, 0x52, 0xfa, 0x19, 0x69, 0x39, - 0x31, 0xce, 0x50, 0x5d, 0x1f, 0x04, 0x71, 0x83, 0x6d, 0xe1, 0xd9, 0x4b, 0x52, 0xa5, 0xf0, 0x5b, - 0x25, 0x35, 0xbc, 0x84, 0x67, 0x2f, 0x59, 0x27, 0x0a, 0xc7, 0x9d, 0x8d, 0x9a, 0x83, 0x20, 0x6e, - 0xb2, 0x2d, 0x3c, 0xff, 0x6a, 0xe9, 0x3e, 0xd9, 0x70, 0xda, 0xf0, 0xeb, 0x68, 0x03, 0x79, 0xd3, - 0x69, 0xf3, 0x9c, 0x3e, 0x25, 0xfb, 0x37, 0x25, 0x14, 0x73, 0x3e, 0x83, 0xc4, 0xe9, 0x82, 0x4f, - 0xce, 0x4e, 0x79, 0x06, 0xd1, 0xe6, 0x20, 0x88, 0x43, 0xd6, 0x45, 0xe9, 0x0d, 0x2a, 0x97, 0x67, - 0xa7, 0x2f, 0x80, 0xfe, 0x44, 0xba, 0x05, 0xdc, 0x94, 0xb2, 0x80, 0x94, 0x27, 0x3a, 0x2b, 0x73, - 0x65, 0xa3, 0xad, 0x41, 0x23, 0x6e, 0x9f, 0x76, 0x87, 0x55, 0x93, 0x86, 0x17, 0x08, 0x9f, 0xa9, - 0x89, 0x66, 0x9d, 0x85, 0xd3, 0x33, 0x4b, 0xbf, 0x26, 0x7b, 0x7a, 0x06, 0x85, 0x15, 0xb9, 0xc9, - 0x80, 0x4f, 0x44, 0x95, 0x36, 0x6a, 0x0d, 0x82, 0x38, 0x60, 0xdd, 0x07, 0xe1, 0x12, 0x39, 0x8d, - 0x49, 0xd7, 0xdf, 0x01, 0x1f, 0x83, 0xc8, 0xb9, 0x95, 0xef, 0x20, 0xda, 0xc6, 0x26, 0xed, 0x7a, - 0x7e, 0x0e, 0x22, 0x1f, 0xc9, 0x77, 0x40, 0x3f, 0x27, 0xdb, 0x05, 0x88, 0x94, 0x6b, 0x95, 0xcd, - 0x23, 0x32, 0x08, 0xe2, 0x16, 0x6b, 0x55, 0xe0, 0x95, 0xca, 0xe6, 0xf4, 0x09, 0xd9, 0x51, 0x00, - 0x29, 0x4f, 0xa5, 0x75, 0x42, 0x25, 0x10, 0xb5, 0xd1, 0x10, 0x56, 0xf0, 0xe7, 0x9a, 0x1d, 0x5b, - 0x72, 0xb0, 0x72, 0x47, 0xd6, 0x68, 0x65, 0x81, 0x9e, 0x90, 0x66, 0xa1, 0xdf, 0xda, 0x28, 0xc0, - 0x12, 0x0f, 0x7d, 0x89, 0xcb, 0x56, 0xfd, 0x96, 0xa1, 0x87, 0x0e, 0xc9, 0x86, 0x75, 0xc2, 0x59, - 0xbc, 0xac, 0xf6, 0x69, 0xf4, 0x88, 0x79, 0x54, 0xe9, 0xcc, 0xdb, 0x8e, 0x67, 0xa4, 0xbb, 0x9a, - 0x89, 0x7e, 0x49, 0xc2, 0xa9, 0x50, 0x69, 0x06, 0x7c, 0x3c, 0x77, 0x60, 0x71, 0x2a, 0x42, 0xd6, - 0xf6, 0xec, 0xbc, 0x42, 0xf4, 0x88, 0xb4, 0xee, 0x6b, 0xa9, 0xde, 0xb4, 0xce, 0xee, 0xcf, 0x55, - 0xb1, 0xfe, 0x52, 0xf8, 0x4c, 0x64, 0x25, 0xd8, 0xa8, 0x31, 0x68, 0xc4, 0x21, 0x0b, 0x3d, 0x7c, - 0x83, 0xec, 0xf8, 0xef, 0x0d, 0x42, 0xff, 0xff, 0x55, 0xf4, 0x29, 0xa1, 0x46, 0x14, 0x4e, 0x3a, - 0xa9, 0x95, 0xe5, 0x36, 0x11, 0x4a, 0x81, 0x1f, 0xcb, 0x26, 0xdb, 0x7b, 0x50, 0x46, 0x5e, 0xa0, - 0x5f, 0x91, 0x8e, 0x9f, 0x98, 0x07, 0xef, 0x3a, 0x7a, 0x77, 0x6b, 0xbc, 0x30, 0x9e, 0x90, 0x3d, - 0x3f, 0xc6, 0x99, 0xd6, 0xd7, 0xa5, 0xe1, 0xd5, 0x84, 0xe3, 0xd0, 0x36, 0x59, 0x07, 0x85, 0x17, - 0xc8, 0x9f, 0xc3, 0xdc, 0xd2, 0x6f, 0x08, 0x5d, 0xf2, 0xfa, 0x26, 0xf8, 0x31, 0xee, 0x7e, 0x64, - 0xf6, 0x9d, 0x78, 0x42, 0x76, 0x0c, 0x14, 0xb9, 0x74, 0x3c, 0x97, 0x49, 0xa1, 0x6d, 0x3d, 0xd7, - 0xa1, 0x87, 0x2f, 0x91, 0xf9, 0x96, 0xa8, 0x89, 0xbc, 0x5a, 0x98, 0x36, 0xbd, 0xc9, 0xc3, 0xda, - 0x74, 0x42, 0xf6, 0xfc, 0x3e, 0x69, 0x03, 0x6a, 0x61, 0xdc, 0xf2, 0xdf, 0x88, 0xc2, 0x2b, 0x03, - 0xea, 0x21, 0x61, 0x3d, 0x97, 0xb5, 0xaf, 0xe5, 0x13, 0x7a, 0x58, 0x9b, 0x86, 0x64, 0x7f, 0xa9, - 0x90, 0xda, 0xba, 0xed, 0xbb, 0xf9, 0x51, 0x25, 0xb5, 0xff, 0x7b, 0x72, 0xe0, 0xe4, 0xf5, 0x8c, - 0x27, 0x99, 0x04, 0xe5, 0x78, 0x61, 0x12, 0x9e, 0xe8, 0x52, 0x39, 0x1c, 0xe7, 0x26, 0xa3, 0x95, - 0x78, 0x81, 0x1a, 0x33, 0xc9, 0x45, 0xa5, 0xd0, 0x33, 0x72, 0xb8, 0x1a, 0x52, 0xbf, 0xa5, 0x8d, - 0x31, 0xfb, 0x4b, 0x31, 0xf5, 0x7b, 0x96, 0x56, 0x25, 0x5c, 0x59, 0x95, 0x47, 0xd7, 0x73, 0xe7, - 0x13, 0xeb, 0xf9, 0x1d, 0xe9, 0xdd, 0x0f, 0x05, 0x4f, 0x44, 0x32, 0x05, 0x3e, 0x95, 0xce, 0x46, - 0xbb, 0xfe, 0x83, 0xef, 0xb5, 0x8b, 0x4a, 0xfa, 0x45, 0x3a, 0x4b, 0x7f, 0x20, 0x87, 0xab, 0x11, - 0xb9, 0xb4, 0x16, 0x6c, 0xd4, 0xc1, 0x98, 0xde, 0x72, 0xcc, 0x4b, 0xd4, 0xce, 0x7f, 0xfc, 0xf0, - 0x57, 0x2b, 0xf8, 0xe7, 0xb6, 0x1f, 0xbc, 0xbf, 0xed, 0x07, 0xff, 0xde, 0xf6, 0x83, 0xdf, 0xef, - 0xfa, 0x6b, 0x7f, 0xdc, 0xf5, 0xd7, 0xde, 0xdf, 0xf5, 0xd7, 0x3e, 0xdc, 0xf5, 0xd7, 0xc8, 0x41, - 0xa2, 0xf3, 0xa1, 0x91, 0xea, 0x2a, 0x11, 0x66, 0xe8, 0x64, 0x3a, 0xc6, 0xc5, 0x7b, 0x1d, 0x8c, - 0x37, 0xf1, 0x0f, 0x7c, 0xf6, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xf0, 0x05, 0xc4, 0x22, 0xd4, - 0x05, 0x00, 0x00, -} - -func (m *SPFreshSearchRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SPFreshSearchRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SPFreshSearchRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.NeedDistance { - i-- - if m.NeedDistance { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if m.ReadOnly { - i-- - if m.ReadOnly { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x50 - } - if m.SearchBeamSize != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.SearchBeamSize)) - i-- - dAtA[i] = 0x48 - } - if m.OversampleFactor != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OversampleFactor)))) - i-- - dAtA[i] = 0x41 - } - if len(m.RequiredColumns) > 0 { - for iNdEx := len(m.RequiredColumns) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.RequiredColumns[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpfreshSearch(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.QueryVectorF32Le) > 0 { - i -= len(m.QueryVectorF32Le) - copy(dAtA[i:], m.QueryVectorF32Le) - i = encodeVarintSpfreshSearch(dAtA, i, uint64(len(m.QueryVectorF32Le))) - i-- - dAtA[i] = 0x32 - } - if m.TopK != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.TopK)) - i-- - dAtA[i] = 0x28 - } - if m.StartTs != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.StartTs)) - i-- - dAtA[i] = 0x20 - } - if m.IndexId != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.IndexId)) - i-- - dAtA[i] = 0x18 - } - if m.TableId != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.TableId)) - i-- - dAtA[i] = 0x10 - } - if m.KeyspaceId != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.KeyspaceId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *SPFreshSearchResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SPFreshSearchResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SPFreshSearchResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Stats != nil { - { - size, err := m.Stats.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpfreshSearch(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Rows) > 0 { - for iNdEx := len(m.Rows) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Rows[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintSpfreshSearch(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *SPFreshSearchRow) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SPFreshSearchRow) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SPFreshSearchRow) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.ColumnValues) > 0 { - for iNdEx := len(m.ColumnValues) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.ColumnValues[iNdEx]) - copy(dAtA[i:], m.ColumnValues[iNdEx]) - i = encodeVarintSpfreshSearch(dAtA, i, uint64(len(m.ColumnValues[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if m.Distance != 0 { - i -= 4 - encoding_binary.LittleEndian.PutUint32(dAtA[i:], uint32(math.Float32bits(float32(m.Distance)))) - i-- - dAtA[i] = 0x15 - } - if len(m.HandleBytes) > 0 { - i -= len(m.HandleBytes) - copy(dAtA[i:], m.HandleBytes) - i = encodeVarintSpfreshSearch(dAtA, i, uint64(len(m.HandleBytes))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *SPFreshSearchStats) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SPFreshSearchStats) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SPFreshSearchStats) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.PartitionCacheMisses != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.PartitionCacheMisses)) - i-- - dAtA[i] = 0x78 - } - if m.PartitionCacheHits != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.PartitionCacheHits)) - i-- - dAtA[i] = 0x70 - } - if m.OversampleFactor != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.OversampleFactor)))) - i-- - dAtA[i] = 0x69 - } - if m.ReadOnly { - i-- - if m.ReadOnly { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x60 - } - if m.TikvClientRpcMicros != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.TikvClientRpcMicros)) - i-- - dAtA[i] = 0x58 - } - if m.TikvClientRpcCount != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.TikvClientRpcCount)) - i-- - dAtA[i] = 0x50 - } - if m.TableLookupMicros != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.TableLookupMicros)) - i-- - dAtA[i] = 0x48 - } - if m.SearchMicros != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.SearchMicros)) - i-- - dAtA[i] = 0x40 - } - if m.IndexOpenMicros != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.IndexOpenMicros)) - i-- - dAtA[i] = 0x38 - } - if m.ConfigMicros != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.ConfigMicros)) - i-- - dAtA[i] = 0x30 - } - if m.PermitMicros != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.PermitMicros)) - i-- - dAtA[i] = 0x28 - } - if m.TableLookupBytes != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.TableLookupBytes)) - i-- - dAtA[i] = 0x20 - } - if m.TableLookupKeys != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.TableLookupKeys)) - i-- - dAtA[i] = 0x18 - } - if m.VectorsScanned != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.VectorsScanned)) - i-- - dAtA[i] = 0x10 - } - if m.PartitionsScanned != 0 { - i = encodeVarintSpfreshSearch(dAtA, i, uint64(m.PartitionsScanned)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintSpfreshSearch(dAtA []byte, offset int, v uint64) int { - offset -= sovSpfreshSearch(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SPFreshSearchRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.KeyspaceId != 0 { - n += 1 + sovSpfreshSearch(uint64(m.KeyspaceId)) - } - if m.TableId != 0 { - n += 1 + sovSpfreshSearch(uint64(m.TableId)) - } - if m.IndexId != 0 { - n += 1 + sovSpfreshSearch(uint64(m.IndexId)) - } - if m.StartTs != 0 { - n += 1 + sovSpfreshSearch(uint64(m.StartTs)) - } - if m.TopK != 0 { - n += 1 + sovSpfreshSearch(uint64(m.TopK)) - } - l = len(m.QueryVectorF32Le) - if l > 0 { - n += 1 + l + sovSpfreshSearch(uint64(l)) - } - if len(m.RequiredColumns) > 0 { - for _, e := range m.RequiredColumns { - l = e.Size() - n += 1 + l + sovSpfreshSearch(uint64(l)) - } - } - if m.OversampleFactor != 0 { - n += 9 - } - if m.SearchBeamSize != 0 { - n += 1 + sovSpfreshSearch(uint64(m.SearchBeamSize)) - } - if m.ReadOnly { - n += 2 - } - if m.NeedDistance { - n += 2 - } - return n -} - -func (m *SPFreshSearchResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Rows) > 0 { - for _, e := range m.Rows { - l = e.Size() - n += 1 + l + sovSpfreshSearch(uint64(l)) - } - } - if m.Stats != nil { - l = m.Stats.Size() - n += 1 + l + sovSpfreshSearch(uint64(l)) - } - return n -} - -func (m *SPFreshSearchRow) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HandleBytes) - if l > 0 { - n += 1 + l + sovSpfreshSearch(uint64(l)) - } - if m.Distance != 0 { - n += 5 - } - if len(m.ColumnValues) > 0 { - for _, b := range m.ColumnValues { - l = len(b) - n += 1 + l + sovSpfreshSearch(uint64(l)) - } - } - return n -} - -func (m *SPFreshSearchStats) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.PartitionsScanned != 0 { - n += 1 + sovSpfreshSearch(uint64(m.PartitionsScanned)) - } - if m.VectorsScanned != 0 { - n += 1 + sovSpfreshSearch(uint64(m.VectorsScanned)) - } - if m.TableLookupKeys != 0 { - n += 1 + sovSpfreshSearch(uint64(m.TableLookupKeys)) - } - if m.TableLookupBytes != 0 { - n += 1 + sovSpfreshSearch(uint64(m.TableLookupBytes)) - } - if m.PermitMicros != 0 { - n += 1 + sovSpfreshSearch(uint64(m.PermitMicros)) - } - if m.ConfigMicros != 0 { - n += 1 + sovSpfreshSearch(uint64(m.ConfigMicros)) - } - if m.IndexOpenMicros != 0 { - n += 1 + sovSpfreshSearch(uint64(m.IndexOpenMicros)) - } - if m.SearchMicros != 0 { - n += 1 + sovSpfreshSearch(uint64(m.SearchMicros)) - } - if m.TableLookupMicros != 0 { - n += 1 + sovSpfreshSearch(uint64(m.TableLookupMicros)) - } - if m.TikvClientRpcCount != 0 { - n += 1 + sovSpfreshSearch(uint64(m.TikvClientRpcCount)) - } - if m.TikvClientRpcMicros != 0 { - n += 1 + sovSpfreshSearch(uint64(m.TikvClientRpcMicros)) - } - if m.ReadOnly { - n += 2 - } - if m.OversampleFactor != 0 { - n += 9 - } - if m.PartitionCacheHits != 0 { - n += 1 + sovSpfreshSearch(uint64(m.PartitionCacheHits)) - } - if m.PartitionCacheMisses != 0 { - n += 1 + sovSpfreshSearch(uint64(m.PartitionCacheMisses)) - } - return n -} - -func sovSpfreshSearch(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSpfreshSearch(x uint64) (n int) { - return sovSpfreshSearch(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SPFreshSearchRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SPFreshSearchRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SPFreshSearchRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyspaceId", wireType) - } - m.KeyspaceId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.KeyspaceId |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TableId", wireType) - } - m.TableId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TableId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IndexId", wireType) - } - m.IndexId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IndexId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field StartTs", wireType) - } - m.StartTs = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.StartTs |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TopK", wireType) - } - m.TopK = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TopK |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field QueryVectorF32Le", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpfreshSearch - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpfreshSearch - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.QueryVectorF32Le = append(m.QueryVectorF32Le[:0], dAtA[iNdEx:postIndex]...) - if m.QueryVectorF32Le == nil { - m.QueryVectorF32Le = []byte{} - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field RequiredColumns", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpfreshSearch - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpfreshSearch - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.RequiredColumns = append(m.RequiredColumns, &ColumnInfo{}) - if err := m.RequiredColumns[len(m.RequiredColumns)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field OversampleFactor", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.OversampleFactor = float64(math.Float64frombits(v)) - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchBeamSize", wireType) - } - m.SearchBeamSize = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SearchBeamSize |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ReadOnly = bool(v != 0) - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field NeedDistance", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.NeedDistance = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipSpfreshSearch(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpfreshSearch - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SPFreshSearchResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SPFreshSearchResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SPFreshSearchResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Rows", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpfreshSearch - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpfreshSearch - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Rows = append(m.Rows, &SPFreshSearchRow{}) - if err := m.Rows[len(m.Rows)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Stats", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthSpfreshSearch - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthSpfreshSearch - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Stats == nil { - m.Stats = &SPFreshSearchStats{} - } - if err := m.Stats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpfreshSearch(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpfreshSearch - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SPFreshSearchRow) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SPFreshSearchRow: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SPFreshSearchRow: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field HandleBytes", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpfreshSearch - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpfreshSearch - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.HandleBytes = append(m.HandleBytes[:0], dAtA[iNdEx:postIndex]...) - if m.HandleBytes == nil { - m.HandleBytes = []byte{} - } - iNdEx = postIndex - case 2: - if wireType != 5 { - return fmt.Errorf("proto: wrong wireType = %d for field Distance", wireType) - } - var v uint32 - if (iNdEx + 4) > l { - return io.ErrUnexpectedEOF - } - v = uint32(encoding_binary.LittleEndian.Uint32(dAtA[iNdEx:])) - iNdEx += 4 - m.Distance = float32(math.Float32frombits(v)) - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ColumnValues", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthSpfreshSearch - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthSpfreshSearch - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ColumnValues = append(m.ColumnValues, make([]byte, postIndex-iNdEx)) - copy(m.ColumnValues[len(m.ColumnValues)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipSpfreshSearch(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpfreshSearch - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *SPFreshSearchStats) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SPFreshSearchStats: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SPFreshSearchStats: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartitionsScanned", wireType) - } - m.PartitionsScanned = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PartitionsScanned |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VectorsScanned", wireType) - } - m.VectorsScanned = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VectorsScanned |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TableLookupKeys", wireType) - } - m.TableLookupKeys = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TableLookupKeys |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TableLookupBytes", wireType) - } - m.TableLookupBytes = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TableLookupBytes |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 5: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PermitMicros", wireType) - } - m.PermitMicros = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PermitMicros |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 6: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ConfigMicros", wireType) - } - m.ConfigMicros = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ConfigMicros |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IndexOpenMicros", wireType) - } - m.IndexOpenMicros = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IndexOpenMicros |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field SearchMicros", wireType) - } - m.SearchMicros = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.SearchMicros |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 9: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TableLookupMicros", wireType) - } - m.TableLookupMicros = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TableLookupMicros |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 10: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TikvClientRpcCount", wireType) - } - m.TikvClientRpcCount = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TikvClientRpcCount |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TikvClientRpcMicros", wireType) - } - m.TikvClientRpcMicros = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TikvClientRpcMicros |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 12: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ReadOnly", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.ReadOnly = bool(v != 0) - case 13: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field OversampleFactor", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.OversampleFactor = float64(math.Float64frombits(v)) - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartitionCacheHits", wireType) - } - m.PartitionCacheHits = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PartitionCacheHits |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 15: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field PartitionCacheMisses", wireType) - } - m.PartitionCacheMisses = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.PartitionCacheMisses |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSpfreshSearch(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpfreshSearch - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSpfreshSearch(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpfreshSearch - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSpfreshSearch - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSpfreshSearch - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSpfreshSearch - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSpfreshSearch = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSpfreshSearch = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSpfreshSearch = fmt.Errorf("proto: unexpected end of group") -) diff --git a/go-tipb/spfresh_teardown.pb.go b/go-tipb/spfresh_teardown.pb.go deleted file mode 100644 index 57191b6f..00000000 --- a/go-tipb/spfresh_teardown.pb.go +++ /dev/null @@ -1,375 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: spfresh_teardown.proto - -package tipb - -import ( - "fmt" - "io" - "math" - - _ "github.com/gogo/protobuf/gogoproto" - proto "github.com/golang/protobuf/proto" - - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type SPFreshTeardownRequest struct { - KeyspaceId uint32 `protobuf:"varint,1,opt,name=keyspace_id,json=keyspaceId,proto3" json:"keyspace_id,omitempty"` - TableId int64 `protobuf:"varint,2,opt,name=table_id,json=tableId,proto3" json:"table_id,omitempty"` - IndexId int64 `protobuf:"varint,3,opt,name=index_id,json=indexId,proto3" json:"index_id,omitempty"` -} - -func (m *SPFreshTeardownRequest) Reset() { *m = SPFreshTeardownRequest{} } -func (m *SPFreshTeardownRequest) String() string { return proto.CompactTextString(m) } -func (*SPFreshTeardownRequest) ProtoMessage() {} -func (*SPFreshTeardownRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c4c300fd4e75fe3c, []int{0} -} -func (m *SPFreshTeardownRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *SPFreshTeardownRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_SPFreshTeardownRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *SPFreshTeardownRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SPFreshTeardownRequest.Merge(m, src) -} -func (m *SPFreshTeardownRequest) XXX_Size() int { - return m.Size() -} -func (m *SPFreshTeardownRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SPFreshTeardownRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SPFreshTeardownRequest proto.InternalMessageInfo - -func (m *SPFreshTeardownRequest) GetKeyspaceId() uint32 { - if m != nil { - return m.KeyspaceId - } - return 0 -} - -func (m *SPFreshTeardownRequest) GetTableId() int64 { - if m != nil { - return m.TableId - } - return 0 -} - -func (m *SPFreshTeardownRequest) GetIndexId() int64 { - if m != nil { - return m.IndexId - } - return 0 -} - -func init() { - proto.RegisterType((*SPFreshTeardownRequest)(nil), "tipb.SPFreshTeardownRequest") -} - -func init() { proto.RegisterFile("spfresh_teardown.proto", fileDescriptor_c4c300fd4e75fe3c) } - -var fileDescriptor_c4c300fd4e75fe3c = []byte{ - // 221 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x2b, 0x2e, 0x48, 0x2b, - 0x4a, 0x2d, 0xce, 0x88, 0x2f, 0x49, 0x4d, 0x2c, 0x4a, 0xc9, 0x2f, 0xcf, 0xd3, 0x2b, 0x28, 0xca, - 0x2f, 0xc9, 0x17, 0x62, 0x29, 0xc9, 0x2c, 0x48, 0x92, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x0b, - 0xe8, 0x83, 0x58, 0x10, 0x39, 0x29, 0xfe, 0xa2, 0xd2, 0xe2, 0x12, 0x30, 0x13, 0x22, 0xa0, 0x94, - 0xcf, 0x25, 0x16, 0x1c, 0xe0, 0x06, 0x32, 0x26, 0x04, 0x6a, 0x4a, 0x50, 0x6a, 0x61, 0x69, 0x6a, - 0x71, 0x89, 0x90, 0x3c, 0x17, 0x77, 0x76, 0x6a, 0x65, 0x71, 0x41, 0x62, 0x72, 0x6a, 0x7c, 0x66, - 0x8a, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x6f, 0x10, 0x17, 0x4c, 0xc8, 0x33, 0x45, 0x48, 0x92, 0x8b, - 0xa3, 0x24, 0x31, 0x29, 0x07, 0x2c, 0xcb, 0xa4, 0xc0, 0xa8, 0xc1, 0x1c, 0xc4, 0x0e, 0xe6, 0x43, - 0xa4, 0x32, 0xf3, 0x52, 0x52, 0x2b, 0x40, 0x52, 0xcc, 0x10, 0x29, 0x30, 0xdf, 0x33, 0xc5, 0xc9, - 0xf2, 0xc6, 0x0a, 0x0e, 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, - 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x19, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, - 0x58, 0x8e, 0x81, 0x4b, 0x34, 0x39, 0x3f, 0x57, 0xaf, 0x20, 0x33, 0x2f, 0x3d, 0x39, 0xb1, 0x40, - 0xaf, 0x24, 0x33, 0x25, 0x49, 0x0f, 0xe4, 0xa1, 0x00, 0xc6, 0x24, 0x36, 0xb0, 0x93, 0x8d, 0x01, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xda, 0x61, 0x19, 0xbf, 0xf9, 0x00, 0x00, 0x00, -} - -func (m *SPFreshTeardownRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *SPFreshTeardownRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *SPFreshTeardownRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.IndexId != 0 { - i = encodeVarintSpfreshTeardown(dAtA, i, uint64(m.IndexId)) - i-- - dAtA[i] = 0x18 - } - if m.TableId != 0 { - i = encodeVarintSpfreshTeardown(dAtA, i, uint64(m.TableId)) - i-- - dAtA[i] = 0x10 - } - if m.KeyspaceId != 0 { - i = encodeVarintSpfreshTeardown(dAtA, i, uint64(m.KeyspaceId)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func encodeVarintSpfreshTeardown(dAtA []byte, offset int, v uint64) int { - offset -= sovSpfreshTeardown(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *SPFreshTeardownRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.KeyspaceId != 0 { - n += 1 + sovSpfreshTeardown(uint64(m.KeyspaceId)) - } - if m.TableId != 0 { - n += 1 + sovSpfreshTeardown(uint64(m.TableId)) - } - if m.IndexId != 0 { - n += 1 + sovSpfreshTeardown(uint64(m.IndexId)) - } - return n -} - -func sovSpfreshTeardown(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozSpfreshTeardown(x uint64) (n int) { - return sovSpfreshTeardown(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *SPFreshTeardownRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshTeardown - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: SPFreshTeardownRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: SPFreshTeardownRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyspaceId", wireType) - } - m.KeyspaceId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshTeardown - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.KeyspaceId |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field TableId", wireType) - } - m.TableId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshTeardown - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.TableId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IndexId", wireType) - } - m.IndexId = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowSpfreshTeardown - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.IndexId |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipSpfreshTeardown(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthSpfreshTeardown - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipSpfreshTeardown(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpfreshTeardown - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpfreshTeardown - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowSpfreshTeardown - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthSpfreshTeardown - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupSpfreshTeardown - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthSpfreshTeardown - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthSpfreshTeardown = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowSpfreshTeardown = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupSpfreshTeardown = fmt.Errorf("proto: unexpected end of group") -) diff --git a/go-tipb/spfresh_test.go b/go-tipb/spfresh_test.go new file mode 100644 index 00000000..675817b9 --- /dev/null +++ b/go-tipb/spfresh_test.go @@ -0,0 +1,123 @@ +package tipb + +import ( + "bytes" + "testing" + + "github.com/gogo/protobuf/proto" +) + +func TestSPFreshFilterExprColumnSourceWireValues(t *testing.T) { + if got := int32(SPFreshFilterExprColumnSource_SPFreshFilterExprColumnSourceUnspecified); got != 0 { + t.Fatalf("unspecified source wire value = %d, want 0", got) + } + if got := int32(SPFreshFilterExprColumnSource_Stored); got != 1 { + t.Fatalf("stored source wire value = %d, want 1", got) + } + if got := int32(SPFreshFilterExprColumnSource_Handle); got != 2 { + t.Fatalf("handle source wire value = %d, want 2", got) + } +} + +func TestSPFreshFilterExprColumnMissingSourceIsUnspecified(t *testing.T) { + // Encodes only column_id = 42, leaving source absent from the wire payload. + var column SPFreshFilterExprColumn + if err := proto.Unmarshal([]byte{0x08, 0x2a}, &column); err != nil { + t.Fatalf("unmarshal column: %v", err) + } + if got := column.GetSource(); got != SPFreshFilterExprColumnSource_SPFreshFilterExprColumnSourceUnspecified { + t.Fatalf("missing source = %v, want unspecified", got) + } +} + +func TestSPFreshEvalContextPreservesSQLMode(t *testing.T) { + const sqlMode = uint64(1<<6 | 1<<21 | 1<<26) + + encoded, err := proto.Marshal(&SPFreshEvalContext{SqlMode: sqlMode}) + if err != nil { + t.Fatalf("proto.Marshal(SPFreshEvalContext) failed: %v", err) + } + var decoded SPFreshEvalContext + if err := proto.Unmarshal(encoded, &decoded); err != nil { + t.Fatalf("proto.Unmarshal(SPFreshEvalContext) failed: %v", err) + } + if got := decoded.GetSqlMode(); got != sqlMode { + t.Fatalf("SPFreshEvalContext.GetSqlMode() = %#x, want %#x", got, sqlMode) + } +} + +func TestSPFreshSearchRequestMaxResponseBytesWireField(t *testing.T) { + const maxResponseBytes = uint64(1 << 63) + + encoded, err := proto.Marshal(&SPFreshSearchRequest{MaxResponseBytes: maxResponseBytes}) + if err != nil { + t.Fatalf("proto.Marshal(SPFreshSearchRequest) failed: %v", err) + } + // Field 15 with wire type 0, followed by the uint64 varint. + want := []byte{0x78, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x01} + if !bytes.Equal(encoded, want) { + t.Fatalf("max_response_bytes wire encoding = %x, want %x", encoded, want) + } + + var decoded SPFreshSearchRequest + if err := proto.Unmarshal(encoded, &decoded); err != nil { + t.Fatalf("proto.Unmarshal(SPFreshSearchRequest) failed: %v", err) + } + if got := decoded.GetMaxResponseBytes(); got != maxResponseBytes { + t.Fatalf("SPFreshSearchRequest.GetMaxResponseBytes() = %d, want %d", got, maxResponseBytes) + } +} + +func TestSPFreshSearchResponseResultIsExclusive(t *testing.T) { + success := &SPFreshSearchResponse{ + Result: &SPFreshSearchResponse_Success{Success: &SPFreshSearchResult{ + WarningCount: 1 << 63, + }}, + } + encoded, err := proto.Marshal(success) + if err != nil { + t.Fatalf("marshal success response: %v", err) + } + var decoded SPFreshSearchResponse + if err := proto.Unmarshal(encoded, &decoded); err != nil { + t.Fatalf("unmarshal success response: %v", err) + } + if decoded.GetSuccess() == nil || decoded.GetError() != nil { + t.Fatalf("success response result = %T, want success only", decoded.GetResult()) + } + if got := decoded.GetSuccess().GetWarningCount(); got != uint64(1)<<63 { + t.Fatalf("warning_count = %d, want %d", got, uint64(1)<<63) + } + + errorResponse := &SPFreshSearchResponse{ + Result: &SPFreshSearchResponse_Error{Error: &Error{Code: int32(SPFreshErrorCode_SPFreshIndexCorruption)}}, + } + encoded, err = proto.Marshal(errorResponse) + if err != nil { + t.Fatalf("marshal error response: %v", err) + } + decoded.Reset() + if err := proto.Unmarshal(encoded, &decoded); err != nil { + t.Fatalf("unmarshal error response: %v", err) + } + if decoded.GetSuccess() != nil || decoded.GetError() == nil { + t.Fatalf("error response result = %T, want error only", decoded.GetResult()) + } + + decoded.Reset() + if decoded.GetResult() != nil || decoded.GetSuccess() != nil || decoded.GetError() != nil { + t.Fatalf("empty response result = %T, want unset", decoded.GetResult()) + } +} + +func TestSPFreshIndexCorruptionCode(t *testing.T) { + if got := int32(SPFreshErrorCode_SPFreshIndexCorruption); got != 9015 { + t.Fatalf("SPFreshIndexCorruption code = %d, want 9015", got) + } +} + +func TestSPFreshResponseTooLargeCode(t *testing.T) { + if got := int32(SPFreshErrorCode_SPFreshResponseTooLarge); got != 9016 { + t.Fatalf("SPFreshResponseTooLarge code = %d, want 9016", got) + } +} diff --git a/proto/spfresh_search.proto b/proto/spfresh.proto similarity index 54% rename from proto/spfresh_search.proto rename to proto/spfresh.proto index 8c261964..b5d53f83 100644 --- a/proto/spfresh_search.proto +++ b/proto/spfresh.proto @@ -5,7 +5,9 @@ package tipb; option java_multiple_files = true; option java_package = "com.pingcap.tidb.tipb"; +import "expression.proto"; import "schema.proto"; +import "select.proto"; import "gogoproto/gogo.proto"; import "rustproto.proto"; @@ -18,6 +20,12 @@ option (gogoproto.goproto_unrecognized_all) = false; option (gogoproto.goproto_sizecache_all) = false; option (rustproto.lite_runtime_all) = true; +message SPFreshTeardownRequest { + uint32 keyspace_id = 1; + int64 table_id = 2; + int64 index_id = 3; +} + message SPFreshSearchRequest { uint32 keyspace_id = 1; int64 table_id = 2; @@ -42,11 +50,75 @@ message SPFreshSearchRequest { // When true, the server populates SPFreshSearchRow.distance in each result row. bool need_distance = 11; + + // Optional pushed-down scalar filter expression over the request-visible + // filter schema. ColumnRef values are dense zero-based offsets into + // filter_expr_columns. + Expr filter_expr = 12; + + // Explicit schema mapping for filter_expr ColumnRef offsets. + repeated SPFreshFilterExprColumn filter_expr_columns = 13; + + // Mandatory statement evaluation properties when filter_expr is present. + SPFreshEvalContext eval_context = 14; + + // Maximum encoded response size accepted by the client. Endpoints must + // reject zero rather than treating it as an unlimited or default budget. + uint64 max_response_bytes = 15; +} + +message SPFreshEvalContext { + string time_zone_name = 1; + int64 time_zone_offset = 2; + uint64 max_warning_count = 3; + uint32 div_precision_increment = 4; + SPFreshTruncateMode truncate_mode = 5; + bool overflow_as_warning = 6; + bool ignore_zero_in_date = 11; + bool divided_by_zero_as_warning = 12; + uint64 max_allowed_packet = 14; + uint64 sql_mode = 15; + + reserved 7, 8, 9, 10, 13; + reserved "no_zero_in_date", "no_zero_date", "allow_invalid_dates", "strict_sql_mode", "error_for_division_by_zero"; +} + +enum SPFreshTruncateMode { + TruncateError = 0; + TruncateIgnore = 1; + TruncateWarning = 2; +} + +enum SPFreshFilterExprColumnSource { + SPFreshFilterExprColumnSourceUnspecified = 0; + Stored = 1; + Handle = 2; +} + +message SPFreshFilterExprColumn { + int64 column_id = 1; + SPFreshFilterExprColumnSource source = 2; + FieldType field_type = 3; } message SPFreshSearchResponse { + oneof result { + SPFreshSearchResult success = 1; + Error error = 2; + } +} + +message SPFreshSearchResult { repeated SPFreshSearchRow rows = 1; SPFreshSearchStats stats = 2; + repeated Error warnings = 3; + uint64 warning_count = 4; +} + +enum SPFreshErrorCode { + SPFreshErrorCodeUnspecified = 0; + SPFreshIndexCorruption = 9015; + SPFreshResponseTooLarge = 9016; } message SPFreshSearchRow { diff --git a/proto/spfresh_teardown.proto b/proto/spfresh_teardown.proto deleted file mode 100644 index f9525336..00000000 --- a/proto/spfresh_teardown.proto +++ /dev/null @@ -1,23 +0,0 @@ -syntax = "proto3"; - -package tipb; - -option java_multiple_files = true; -option java_package = "com.pingcap.tidb.tipb"; - -import "gogoproto/gogo.proto"; -import "rustproto.proto"; - -option (gogoproto.marshaler_all) = true; -option (gogoproto.sizer_all) = true; -option (gogoproto.unmarshaler_all) = true; -option (gogoproto.goproto_unkeyed_all) = false; -option (gogoproto.goproto_unrecognized_all) = false; -option (gogoproto.goproto_sizecache_all) = false; -option (rustproto.lite_runtime_all) = true; - -message SPFreshTeardownRequest { - uint32 keyspace_id = 1; - int64 table_id = 2; - int64 index_id = 3; -} diff --git a/scripts/proto.lock b/scripts/proto.lock index 3b4018fa..cdc92916 100644 --- a/scripts/proto.lock +++ b/scripts/proto.lock @@ -8471,9 +8471,79 @@ } }, { - "protopath": "spfresh_search.proto", + "protopath": "spfresh.proto", "def": { + "enums": [ + { + "name": "SPFreshTruncateMode", + "enum_fields": [ + { + "name": "TruncateError" + }, + { + "name": "TruncateIgnore", + "integer": 1 + }, + { + "name": "TruncateWarning", + "integer": 2 + } + ] + }, + { + "name": "SPFreshFilterExprColumnSource", + "enum_fields": [ + { + "name": "SPFreshFilterExprColumnSourceUnspecified" + }, + { + "name": "Stored", + "integer": 1 + }, + { + "name": "Handle", + "integer": 2 + } + ] + }, + { + "name": "SPFreshErrorCode", + "enum_fields": [ + { + "name": "SPFreshErrorCodeUnspecified" + }, + { + "name": "SPFreshIndexCorruption", + "integer": 9015 + }, + { + "name": "SPFreshResponseTooLarge", + "integer": 9016 + } + ] + } + ], "messages": [ + { + "name": "SPFreshTeardownRequest", + "fields": [ + { + "id": 1, + "name": "keyspace_id", + "type": "uint32" + }, + { + "id": 2, + "name": "table_id", + "type": "int64" + }, + { + "id": 3, + "name": "index_id", + "type": "int64" + } + ] + }, { "name": "SPFreshSearchRequest", "fields": [ @@ -8532,11 +8602,138 @@ "id": 11, "name": "need_distance", "type": "bool" + }, + { + "id": 12, + "name": "filter_expr", + "type": "Expr" + }, + { + "id": 13, + "name": "filter_expr_columns", + "type": "SPFreshFilterExprColumn", + "is_repeated": true + }, + { + "id": 14, + "name": "eval_context", + "type": "SPFreshEvalContext" + }, + { + "id": 15, + "name": "max_response_bytes", + "type": "uint64" + } + ] + }, + { + "name": "SPFreshEvalContext", + "fields": [ + { + "id": 1, + "name": "time_zone_name", + "type": "string" + }, + { + "id": 2, + "name": "time_zone_offset", + "type": "int64" + }, + { + "id": 3, + "name": "max_warning_count", + "type": "uint64" + }, + { + "id": 4, + "name": "div_precision_increment", + "type": "uint32" + }, + { + "id": 5, + "name": "truncate_mode", + "type": "SPFreshTruncateMode" + }, + { + "id": 6, + "name": "overflow_as_warning", + "type": "bool" + }, + { + "id": 11, + "name": "ignore_zero_in_date", + "type": "bool" + }, + { + "id": 12, + "name": "divided_by_zero_as_warning", + "type": "bool" + }, + { + "id": 14, + "name": "max_allowed_packet", + "type": "uint64" + }, + { + "id": 15, + "name": "sql_mode", + "type": "uint64" + } + ], + "reserved_ids": [ + 7, + 8, + 9, + 10, + 13 + ], + "reserved_names": [ + "no_zero_in_date", + "no_zero_date", + "allow_invalid_dates", + "strict_sql_mode", + "error_for_division_by_zero" + ] + }, + { + "name": "SPFreshFilterExprColumn", + "fields": [ + { + "id": 1, + "name": "column_id", + "type": "int64" + }, + { + "id": 2, + "name": "source", + "type": "SPFreshFilterExprColumnSource" + }, + { + "id": 3, + "name": "field_type", + "type": "FieldType" } ] }, { "name": "SPFreshSearchResponse", + "fields": [ + { + "id": 1, + "name": "success", + "type": "SPFreshSearchResult", + "oneof_parent": "result" + }, + { + "id": 2, + "name": "error", + "type": "Error", + "oneof_parent": "result" + } + ] + }, + { + "name": "SPFreshSearchResult", "fields": [ { "id": 1, @@ -8548,6 +8745,17 @@ "id": 2, "name": "stats", "type": "SPFreshSearchStats" + }, + { + "id": 3, + "name": "warnings", + "type": "Error", + "is_repeated": true + }, + { + "id": 4, + "name": "warning_count", + "type": "uint64" } ] }, @@ -8655,84 +8863,14 @@ ], "imports": [ { - "path": "schema.proto" - }, - { - "path": "gogoproto/gogo.proto" - }, - { - "path": "rustproto.proto" - } - ], - "package": { - "name": "tipb" - }, - "options": [ - { - "name": "java_multiple_files", - "value": "true" - }, - { - "name": "java_package", - "value": "com.pingcap.tidb.tipb" - }, - { - "name": "(gogoproto.marshaler_all)", - "value": "true" - }, - { - "name": "(gogoproto.sizer_all)", - "value": "true" - }, - { - "name": "(gogoproto.unmarshaler_all)", - "value": "true" - }, - { - "name": "(gogoproto.goproto_unkeyed_all)", - "value": "false" + "path": "expression.proto" }, { - "name": "(gogoproto.goproto_unrecognized_all)", - "value": "false" + "path": "schema.proto" }, { - "name": "(gogoproto.goproto_sizecache_all)", - "value": "false" + "path": "select.proto" }, - { - "name": "(rustproto.lite_runtime_all)", - "value": "true" - } - ] - } - }, - { - "protopath": "spfresh_teardown.proto", - "def": { - "messages": [ - { - "name": "SPFreshTeardownRequest", - "fields": [ - { - "id": 1, - "name": "keyspace_id", - "type": "uint32" - }, - { - "id": 2, - "name": "table_id", - "type": "int64" - }, - { - "id": 3, - "name": "index_id", - "type": "int64" - } - ] - } - ], - "imports": [ { "path": "gogoproto/gogo.proto" },