github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/pkg/sql/inverted/span_expression.pb.go (about)

     1  // Code generated by protoc-gen-gogo. DO NOT EDIT.
     2  // source: sql/inverted/span_expression.proto
     3  
     4  package inverted
     5  
     6  import (
     7  	fmt "fmt"
     8  	_ "github.com/gogo/protobuf/gogoproto"
     9  	proto "github.com/gogo/protobuf/proto"
    10  	io "io"
    11  	math "math"
    12  	math_bits "math/bits"
    13  )
    14  
    15  // Reference imports to suppress errors if they are not otherwise used.
    16  var _ = proto.Marshal
    17  var _ = fmt.Errorf
    18  var _ = math.Inf
    19  
    20  // This is a compile-time assertion to ensure that this generated file
    21  // is compatible with the proto package it is being compiled against.
    22  // A compilation error at this line likely means your copy of the
    23  // proto package needs to be updated.
    24  const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
    25  
    26  // SetOperator is an operator on sets.
    27  type SetOperator int32
    28  
    29  const (
    30  	// None is used in an expression node with no children.
    31  	None SetOperator = 0
    32  	// SetUnion unions the children.
    33  	SetUnion SetOperator = 1
    34  	// SetIntersection intersects the children.
    35  	SetIntersection SetOperator = 2
    36  )
    37  
    38  var SetOperator_name = map[int32]string{
    39  	0: "None",
    40  	1: "SetUnion",
    41  	2: "SetIntersection",
    42  }
    43  
    44  var SetOperator_value = map[string]int32{
    45  	"None":            0,
    46  	"SetUnion":        1,
    47  	"SetIntersection": 2,
    48  }
    49  
    50  func (x SetOperator) String() string {
    51  	return proto.EnumName(SetOperator_name, int32(x))
    52  }
    53  
    54  func (SetOperator) EnumDescriptor() ([]byte, []int) {
    55  	return fileDescriptor_3007edc9c4a12a18, []int{0}
    56  }
    57  
    58  // SpanExpressionProto is a proto representation of an inverted.Expression
    59  // tree consisting only of SpanExpressions. It is intended for use in
    60  // expression execution.
    61  type SpanExpressionProto struct {
    62  	SpansToRead []SpanExpressionProto_Span `protobuf:"bytes,1,rep,name=spans_to_read,json=spansToRead,proto3" json:"spans_to_read"`
    63  	Node        SpanExpressionProto_Node   `protobuf:"bytes,2,opt,name=node,proto3" json:"node"`
    64  }
    65  
    66  func (m *SpanExpressionProto) Reset()         { *m = SpanExpressionProto{} }
    67  func (m *SpanExpressionProto) String() string { return proto.CompactTextString(m) }
    68  func (*SpanExpressionProto) ProtoMessage()    {}
    69  func (*SpanExpressionProto) Descriptor() ([]byte, []int) {
    70  	return fileDescriptor_3007edc9c4a12a18, []int{0}
    71  }
    72  func (m *SpanExpressionProto) XXX_Unmarshal(b []byte) error {
    73  	return m.Unmarshal(b)
    74  }
    75  func (m *SpanExpressionProto) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    76  	b = b[:cap(b)]
    77  	n, err := m.MarshalToSizedBuffer(b)
    78  	if err != nil {
    79  		return nil, err
    80  	}
    81  	return b[:n], nil
    82  }
    83  func (m *SpanExpressionProto) XXX_Merge(src proto.Message) {
    84  	xxx_messageInfo_SpanExpressionProto.Merge(m, src)
    85  }
    86  func (m *SpanExpressionProto) XXX_Size() int {
    87  	return m.Size()
    88  }
    89  func (m *SpanExpressionProto) XXX_DiscardUnknown() {
    90  	xxx_messageInfo_SpanExpressionProto.DiscardUnknown(m)
    91  }
    92  
    93  var xxx_messageInfo_SpanExpressionProto proto.InternalMessageInfo
    94  
    95  // Span is a span of the inverted index. Represents [start, end).
    96  type SpanExpressionProto_Span struct {
    97  	Start []byte `protobuf:"bytes,1,opt,name=start,proto3" json:"start,omitempty"`
    98  	End   []byte `protobuf:"bytes,2,opt,name=end,proto3" json:"end,omitempty"`
    99  }
   100  
   101  func (m *SpanExpressionProto_Span) Reset()         { *m = SpanExpressionProto_Span{} }
   102  func (m *SpanExpressionProto_Span) String() string { return proto.CompactTextString(m) }
   103  func (*SpanExpressionProto_Span) ProtoMessage()    {}
   104  func (*SpanExpressionProto_Span) Descriptor() ([]byte, []int) {
   105  	return fileDescriptor_3007edc9c4a12a18, []int{0, 0}
   106  }
   107  func (m *SpanExpressionProto_Span) XXX_Unmarshal(b []byte) error {
   108  	return m.Unmarshal(b)
   109  }
   110  func (m *SpanExpressionProto_Span) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   111  	b = b[:cap(b)]
   112  	n, err := m.MarshalToSizedBuffer(b)
   113  	if err != nil {
   114  		return nil, err
   115  	}
   116  	return b[:n], nil
   117  }
   118  func (m *SpanExpressionProto_Span) XXX_Merge(src proto.Message) {
   119  	xxx_messageInfo_SpanExpressionProto_Span.Merge(m, src)
   120  }
   121  func (m *SpanExpressionProto_Span) XXX_Size() int {
   122  	return m.Size()
   123  }
   124  func (m *SpanExpressionProto_Span) XXX_DiscardUnknown() {
   125  	xxx_messageInfo_SpanExpressionProto_Span.DiscardUnknown(m)
   126  }
   127  
   128  var xxx_messageInfo_SpanExpressionProto_Span proto.InternalMessageInfo
   129  
   130  type SpanExpressionProto_Node struct {
   131  	FactoredUnionSpans []SpanExpressionProto_Span `protobuf:"bytes,1,rep,name=factored_union_spans,json=factoredUnionSpans,proto3" json:"factored_union_spans"`
   132  	Operator           SetOperator                `protobuf:"varint,2,opt,name=operator,proto3,enum=cockroach.sql.inverted.SetOperator" json:"operator,omitempty"`
   133  	Left               *SpanExpressionProto_Node  `protobuf:"bytes,3,opt,name=left,proto3" json:"left,omitempty"`
   134  	Right              *SpanExpressionProto_Node  `protobuf:"bytes,4,opt,name=right,proto3" json:"right,omitempty"`
   135  }
   136  
   137  func (m *SpanExpressionProto_Node) Reset()         { *m = SpanExpressionProto_Node{} }
   138  func (m *SpanExpressionProto_Node) String() string { return proto.CompactTextString(m) }
   139  func (*SpanExpressionProto_Node) ProtoMessage()    {}
   140  func (*SpanExpressionProto_Node) Descriptor() ([]byte, []int) {
   141  	return fileDescriptor_3007edc9c4a12a18, []int{0, 1}
   142  }
   143  func (m *SpanExpressionProto_Node) XXX_Unmarshal(b []byte) error {
   144  	return m.Unmarshal(b)
   145  }
   146  func (m *SpanExpressionProto_Node) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   147  	b = b[:cap(b)]
   148  	n, err := m.MarshalToSizedBuffer(b)
   149  	if err != nil {
   150  		return nil, err
   151  	}
   152  	return b[:n], nil
   153  }
   154  func (m *SpanExpressionProto_Node) XXX_Merge(src proto.Message) {
   155  	xxx_messageInfo_SpanExpressionProto_Node.Merge(m, src)
   156  }
   157  func (m *SpanExpressionProto_Node) XXX_Size() int {
   158  	return m.Size()
   159  }
   160  func (m *SpanExpressionProto_Node) XXX_DiscardUnknown() {
   161  	xxx_messageInfo_SpanExpressionProto_Node.DiscardUnknown(m)
   162  }
   163  
   164  var xxx_messageInfo_SpanExpressionProto_Node proto.InternalMessageInfo
   165  
   166  func init() {
   167  	proto.RegisterEnum("cockroach.parser.sql.inverted.SetOperator", SetOperator_name, SetOperator_value)
   168  	proto.RegisterType((*SpanExpressionProto)(nil), "cockroach.parser.sql.inverted.SpanExpressionProto")
   169  	proto.RegisterType((*SpanExpressionProto_Span)(nil), "cockroach.parser.sql.inverted.SpanExpressionProto.Span")
   170  	proto.RegisterType((*SpanExpressionProto_Node)(nil), "cockroach.parser.sql.inverted.SpanExpressionProto.Node")
   171  }
   172  
   173  func init() {
   174  	proto.RegisterFile("sql/inverted/span_expression.proto", fileDescriptor_3007edc9c4a12a18)
   175  }
   176  
   177  var fileDescriptor_3007edc9c4a12a18 = []byte{
   178  	// 416 bytes of a gzipped FileDescriptorProto
   179  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x93, 0x41, 0x6e, 0x13, 0x31,
   180  	0x14, 0x86, 0xc7, 0x89, 0x8b, 0x22, 0x27, 0x40, 0xe4, 0x46, 0x68, 0x94, 0x85, 0x89, 0xca, 0xa6,
   181  	0x62, 0x31, 0x03, 0xe5, 0x00, 0xa0, 0x0a, 0x90, 0x60, 0x01, 0x68, 0x06, 0x36, 0xdd, 0x8c, 0x9c,
   182  	0xf1, 0xeb, 0xcc, 0xa8, 0xc1, 0x6f, 0x6a, 0xbb, 0x88, 0x23, 0xb0, 0xe4, 0x0e, 0x1c, 0x80, 0x23,
   183  	0xb0, 0xcd, 0xb2, 0xcb, 0xae, 0x10, 0x4c, 0x2e, 0x82, 0xec, 0xb4, 0xa1, 0x8b, 0xb2, 0xa0, 0xdd,
   184  	0xbd, 0x79, 0xf3, 0xff, 0x9f, 0xff, 0xf7, 0x64, 0xb3, 0x1d, 0x7b, 0xbc, 0x48, 0x1b, 0xfd, 0x09,
   185  	0x8c, 0x03, 0x95, 0xda, 0x56, 0xea, 0x02, 0x3e, 0xb7, 0x06, 0xac, 0x6d, 0x50, 0x27, 0xad, 0x41,
   186  	0x87, 0xfc, 0x5e, 0x89, 0xe5, 0x91, 0x41, 0x59, 0xd6, 0x89, 0x3d, 0x5e, 0x24, 0x17, 0xea, 0xe9,
   187  	0xa4, 0xc2, 0x0a, 0x83, 0x24, 0xf5, 0xd5, 0x5a, 0xbd, 0xf3, 0x9d, 0xb2, 0xed, 0xbc, 0x95, 0xfa,
   188  	0xc5, 0x06, 0xf3, 0x2e, 0x50, 0x0e, 0xd8, 0x6d, 0x8f, 0xb7, 0x85, 0xc3, 0xc2, 0x80, 0x54, 0x31,
   189  	0x99, 0xf5, 0x77, 0x87, 0x7b, 0x8f, 0x92, 0xab, 0xe9, 0xc9, 0x15, 0x8c, 0xd0, 0xdb, 0xa7, 0xcb,
   190  	0x9f, 0xf7, 0xa3, 0x6c, 0x18, 0x60, 0xef, 0x31, 0x03, 0xa9, 0xf8, 0x6b, 0x46, 0x35, 0x2a, 0x88,
   191  	0x7b, 0x33, 0xf2, 0xbf, 0xc8, 0x37, 0xa8, 0xe0, 0x1c, 0x19, 0x18, 0xd3, 0x84, 0x51, 0xaf, 0xe3,
   192  	0x13, 0xb6, 0x65, 0x9d, 0x34, 0x2e, 0x26, 0x33, 0xb2, 0x3b, 0xca, 0xd6, 0x1f, 0x7c, 0xcc, 0xfa,
   193  	0xa0, 0x55, 0x38, 0x68, 0x94, 0xf9, 0x72, 0xfa, 0xa3, 0xc7, 0xa8, 0x87, 0xf0, 0x9a, 0x4d, 0x0e,
   194  	0x65, 0xe9, 0xd0, 0x80, 0x2a, 0x4e, 0x74, 0x83, 0xba, 0x08, 0x11, 0x6f, 0x38, 0x27, 0xbf, 0x60,
   195  	0x7e, 0xf0, 0x48, 0xff, 0xc3, 0xf2, 0xa7, 0x6c, 0x80, 0x2d, 0x18, 0xe9, 0xd0, 0x84, 0x24, 0x77,
   196  	0xf6, 0x1e, 0xfc, 0x93, 0x0e, 0xee, 0xed, 0xb9, 0x34, 0xdb, 0x98, 0xf8, 0x73, 0x46, 0x17, 0x70,
   197  	0xe8, 0xe2, 0xfe, 0xf5, 0xf6, 0x95, 0x05, 0x37, 0x7f, 0xc9, 0xb6, 0x4c, 0x53, 0xd5, 0x2e, 0xa6,
   198  	0xd7, 0xc4, 0xac, 0xed, 0x0f, 0x9f, 0xb1, 0xe1, 0xa5, 0x98, 0x7c, 0xe0, 0xf7, 0xa9, 0x61, 0x1c,
   199  	0xf1, 0x11, 0x1b, 0xe4, 0xe0, 0xc2, 0xe0, 0x63, 0xc2, 0xb7, 0xd9, 0xdd, 0x1c, 0xdc, 0x2b, 0xed,
   200  	0xc0, 0x58, 0x28, 0x9d, 0x6f, 0xf6, 0xa6, 0xf4, 0xcb, 0x37, 0x11, 0xed, 0xe7, 0xcb, 0xdf, 0x22,
   201  	0x5a, 0x76, 0x82, 0x9c, 0x76, 0x82, 0x9c, 0x75, 0x82, 0xfc, 0xea, 0x04, 0xf9, 0xba, 0x12, 0xd1,
   202  	0xe9, 0x4a, 0x44, 0x67, 0x2b, 0x11, 0x1d, 0x3c, 0xae, 0x1a, 0x57, 0x9f, 0xcc, 0x93, 0x12, 0x3f,
   203  	0xa6, 0x9b, 0x98, 0x6a, 0xfe, 0xb7, 0x4e, 0xdb, 0xa3, 0x2a, 0xbd, 0xfc, 0x18, 0xe6, 0xb7, 0xc2,
   204  	0x7d, 0x7e, 0xf2, 0x27, 0x00, 0x00, 0xff, 0xff, 0x77, 0x58, 0x04, 0xc2, 0x23, 0x03, 0x00, 0x00,
   205  }
   206  
   207  func (m *SpanExpressionProto) Marshal() (dAtA []byte, err error) {
   208  	size := m.Size()
   209  	dAtA = make([]byte, size)
   210  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   211  	if err != nil {
   212  		return nil, err
   213  	}
   214  	return dAtA[:n], nil
   215  }
   216  
   217  func (m *SpanExpressionProto) MarshalTo(dAtA []byte) (int, error) {
   218  	size := m.Size()
   219  	return m.MarshalToSizedBuffer(dAtA[:size])
   220  }
   221  
   222  func (m *SpanExpressionProto) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   223  	i := len(dAtA)
   224  	_ = i
   225  	var l int
   226  	_ = l
   227  	{
   228  		size, err := m.Node.MarshalToSizedBuffer(dAtA[:i])
   229  		if err != nil {
   230  			return 0, err
   231  		}
   232  		i -= size
   233  		i = encodeVarintSpanExpression(dAtA, i, uint64(size))
   234  	}
   235  	i--
   236  	dAtA[i] = 0x12
   237  	if len(m.SpansToRead) > 0 {
   238  		for iNdEx := len(m.SpansToRead) - 1; iNdEx >= 0; iNdEx-- {
   239  			{
   240  				size, err := m.SpansToRead[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   241  				if err != nil {
   242  					return 0, err
   243  				}
   244  				i -= size
   245  				i = encodeVarintSpanExpression(dAtA, i, uint64(size))
   246  			}
   247  			i--
   248  			dAtA[i] = 0xa
   249  		}
   250  	}
   251  	return len(dAtA) - i, nil
   252  }
   253  
   254  func (m *SpanExpressionProto_Span) Marshal() (dAtA []byte, err error) {
   255  	size := m.Size()
   256  	dAtA = make([]byte, size)
   257  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   258  	if err != nil {
   259  		return nil, err
   260  	}
   261  	return dAtA[:n], nil
   262  }
   263  
   264  func (m *SpanExpressionProto_Span) MarshalTo(dAtA []byte) (int, error) {
   265  	size := m.Size()
   266  	return m.MarshalToSizedBuffer(dAtA[:size])
   267  }
   268  
   269  func (m *SpanExpressionProto_Span) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   270  	i := len(dAtA)
   271  	_ = i
   272  	var l int
   273  	_ = l
   274  	if len(m.End) > 0 {
   275  		i -= len(m.End)
   276  		copy(dAtA[i:], m.End)
   277  		i = encodeVarintSpanExpression(dAtA, i, uint64(len(m.End)))
   278  		i--
   279  		dAtA[i] = 0x12
   280  	}
   281  	if len(m.Start) > 0 {
   282  		i -= len(m.Start)
   283  		copy(dAtA[i:], m.Start)
   284  		i = encodeVarintSpanExpression(dAtA, i, uint64(len(m.Start)))
   285  		i--
   286  		dAtA[i] = 0xa
   287  	}
   288  	return len(dAtA) - i, nil
   289  }
   290  
   291  func (m *SpanExpressionProto_Node) Marshal() (dAtA []byte, err error) {
   292  	size := m.Size()
   293  	dAtA = make([]byte, size)
   294  	n, err := m.MarshalToSizedBuffer(dAtA[:size])
   295  	if err != nil {
   296  		return nil, err
   297  	}
   298  	return dAtA[:n], nil
   299  }
   300  
   301  func (m *SpanExpressionProto_Node) MarshalTo(dAtA []byte) (int, error) {
   302  	size := m.Size()
   303  	return m.MarshalToSizedBuffer(dAtA[:size])
   304  }
   305  
   306  func (m *SpanExpressionProto_Node) MarshalToSizedBuffer(dAtA []byte) (int, error) {
   307  	i := len(dAtA)
   308  	_ = i
   309  	var l int
   310  	_ = l
   311  	if m.Right != nil {
   312  		{
   313  			size, err := m.Right.MarshalToSizedBuffer(dAtA[:i])
   314  			if err != nil {
   315  				return 0, err
   316  			}
   317  			i -= size
   318  			i = encodeVarintSpanExpression(dAtA, i, uint64(size))
   319  		}
   320  		i--
   321  		dAtA[i] = 0x22
   322  	}
   323  	if m.Left != nil {
   324  		{
   325  			size, err := m.Left.MarshalToSizedBuffer(dAtA[:i])
   326  			if err != nil {
   327  				return 0, err
   328  			}
   329  			i -= size
   330  			i = encodeVarintSpanExpression(dAtA, i, uint64(size))
   331  		}
   332  		i--
   333  		dAtA[i] = 0x1a
   334  	}
   335  	if m.Operator != 0 {
   336  		i = encodeVarintSpanExpression(dAtA, i, uint64(m.Operator))
   337  		i--
   338  		dAtA[i] = 0x10
   339  	}
   340  	if len(m.FactoredUnionSpans) > 0 {
   341  		for iNdEx := len(m.FactoredUnionSpans) - 1; iNdEx >= 0; iNdEx-- {
   342  			{
   343  				size, err := m.FactoredUnionSpans[iNdEx].MarshalToSizedBuffer(dAtA[:i])
   344  				if err != nil {
   345  					return 0, err
   346  				}
   347  				i -= size
   348  				i = encodeVarintSpanExpression(dAtA, i, uint64(size))
   349  			}
   350  			i--
   351  			dAtA[i] = 0xa
   352  		}
   353  	}
   354  	return len(dAtA) - i, nil
   355  }
   356  
   357  func encodeVarintSpanExpression(dAtA []byte, offset int, v uint64) int {
   358  	offset -= sovSpanExpression(v)
   359  	base := offset
   360  	for v >= 1<<7 {
   361  		dAtA[offset] = uint8(v&0x7f | 0x80)
   362  		v >>= 7
   363  		offset++
   364  	}
   365  	dAtA[offset] = uint8(v)
   366  	return base
   367  }
   368  func (m *SpanExpressionProto) Size() (n int) {
   369  	if m == nil {
   370  		return 0
   371  	}
   372  	var l int
   373  	_ = l
   374  	if len(m.SpansToRead) > 0 {
   375  		for _, e := range m.SpansToRead {
   376  			l = e.Size()
   377  			n += 1 + l + sovSpanExpression(uint64(l))
   378  		}
   379  	}
   380  	l = m.Node.Size()
   381  	n += 1 + l + sovSpanExpression(uint64(l))
   382  	return n
   383  }
   384  
   385  func (m *SpanExpressionProto_Span) Size() (n int) {
   386  	if m == nil {
   387  		return 0
   388  	}
   389  	var l int
   390  	_ = l
   391  	l = len(m.Start)
   392  	if l > 0 {
   393  		n += 1 + l + sovSpanExpression(uint64(l))
   394  	}
   395  	l = len(m.End)
   396  	if l > 0 {
   397  		n += 1 + l + sovSpanExpression(uint64(l))
   398  	}
   399  	return n
   400  }
   401  
   402  func (m *SpanExpressionProto_Node) Size() (n int) {
   403  	if m == nil {
   404  		return 0
   405  	}
   406  	var l int
   407  	_ = l
   408  	if len(m.FactoredUnionSpans) > 0 {
   409  		for _, e := range m.FactoredUnionSpans {
   410  			l = e.Size()
   411  			n += 1 + l + sovSpanExpression(uint64(l))
   412  		}
   413  	}
   414  	if m.Operator != 0 {
   415  		n += 1 + sovSpanExpression(uint64(m.Operator))
   416  	}
   417  	if m.Left != nil {
   418  		l = m.Left.Size()
   419  		n += 1 + l + sovSpanExpression(uint64(l))
   420  	}
   421  	if m.Right != nil {
   422  		l = m.Right.Size()
   423  		n += 1 + l + sovSpanExpression(uint64(l))
   424  	}
   425  	return n
   426  }
   427  
   428  func sovSpanExpression(x uint64) (n int) {
   429  	return (math_bits.Len64(x|1) + 6) / 7
   430  }
   431  func sozSpanExpression(x uint64) (n int) {
   432  	return sovSpanExpression(uint64((x << 1) ^ uint64((int64(x) >> 63))))
   433  }
   434  func (m *SpanExpressionProto) Unmarshal(dAtA []byte) error {
   435  	l := len(dAtA)
   436  	iNdEx := 0
   437  	for iNdEx < l {
   438  		preIndex := iNdEx
   439  		var wire uint64
   440  		for shift := uint(0); ; shift += 7 {
   441  			if shift >= 64 {
   442  				return ErrIntOverflowSpanExpression
   443  			}
   444  			if iNdEx >= l {
   445  				return io.ErrUnexpectedEOF
   446  			}
   447  			b := dAtA[iNdEx]
   448  			iNdEx++
   449  			wire |= uint64(b&0x7F) << shift
   450  			if b < 0x80 {
   451  				break
   452  			}
   453  		}
   454  		fieldNum := int32(wire >> 3)
   455  		wireType := int(wire & 0x7)
   456  		if wireType == 4 {
   457  			return fmt.Errorf("proto: SpanExpressionProto: wiretype end group for non-group")
   458  		}
   459  		if fieldNum <= 0 {
   460  			return fmt.Errorf("proto: SpanExpressionProto: illegal tag %d (wire type %d)", fieldNum, wire)
   461  		}
   462  		switch fieldNum {
   463  		case 1:
   464  			if wireType != 2 {
   465  				return fmt.Errorf("proto: wrong wireType = %d for field SpansToRead", wireType)
   466  			}
   467  			var msglen int
   468  			for shift := uint(0); ; shift += 7 {
   469  				if shift >= 64 {
   470  					return ErrIntOverflowSpanExpression
   471  				}
   472  				if iNdEx >= l {
   473  					return io.ErrUnexpectedEOF
   474  				}
   475  				b := dAtA[iNdEx]
   476  				iNdEx++
   477  				msglen |= int(b&0x7F) << shift
   478  				if b < 0x80 {
   479  					break
   480  				}
   481  			}
   482  			if msglen < 0 {
   483  				return ErrInvalidLengthSpanExpression
   484  			}
   485  			postIndex := iNdEx + msglen
   486  			if postIndex < 0 {
   487  				return ErrInvalidLengthSpanExpression
   488  			}
   489  			if postIndex > l {
   490  				return io.ErrUnexpectedEOF
   491  			}
   492  			m.SpansToRead = append(m.SpansToRead, SpanExpressionProto_Span{})
   493  			if err := m.SpansToRead[len(m.SpansToRead)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   494  				return err
   495  			}
   496  			iNdEx = postIndex
   497  		case 2:
   498  			if wireType != 2 {
   499  				return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType)
   500  			}
   501  			var msglen int
   502  			for shift := uint(0); ; shift += 7 {
   503  				if shift >= 64 {
   504  					return ErrIntOverflowSpanExpression
   505  				}
   506  				if iNdEx >= l {
   507  					return io.ErrUnexpectedEOF
   508  				}
   509  				b := dAtA[iNdEx]
   510  				iNdEx++
   511  				msglen |= int(b&0x7F) << shift
   512  				if b < 0x80 {
   513  					break
   514  				}
   515  			}
   516  			if msglen < 0 {
   517  				return ErrInvalidLengthSpanExpression
   518  			}
   519  			postIndex := iNdEx + msglen
   520  			if postIndex < 0 {
   521  				return ErrInvalidLengthSpanExpression
   522  			}
   523  			if postIndex > l {
   524  				return io.ErrUnexpectedEOF
   525  			}
   526  			if err := m.Node.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   527  				return err
   528  			}
   529  			iNdEx = postIndex
   530  		default:
   531  			iNdEx = preIndex
   532  			skippy, err := skipSpanExpression(dAtA[iNdEx:])
   533  			if err != nil {
   534  				return err
   535  			}
   536  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   537  				return ErrInvalidLengthSpanExpression
   538  			}
   539  			if (iNdEx + skippy) > l {
   540  				return io.ErrUnexpectedEOF
   541  			}
   542  			iNdEx += skippy
   543  		}
   544  	}
   545  
   546  	if iNdEx > l {
   547  		return io.ErrUnexpectedEOF
   548  	}
   549  	return nil
   550  }
   551  func (m *SpanExpressionProto_Span) Unmarshal(dAtA []byte) error {
   552  	l := len(dAtA)
   553  	iNdEx := 0
   554  	for iNdEx < l {
   555  		preIndex := iNdEx
   556  		var wire uint64
   557  		for shift := uint(0); ; shift += 7 {
   558  			if shift >= 64 {
   559  				return ErrIntOverflowSpanExpression
   560  			}
   561  			if iNdEx >= l {
   562  				return io.ErrUnexpectedEOF
   563  			}
   564  			b := dAtA[iNdEx]
   565  			iNdEx++
   566  			wire |= uint64(b&0x7F) << shift
   567  			if b < 0x80 {
   568  				break
   569  			}
   570  		}
   571  		fieldNum := int32(wire >> 3)
   572  		wireType := int(wire & 0x7)
   573  		if wireType == 4 {
   574  			return fmt.Errorf("proto: Span: wiretype end group for non-group")
   575  		}
   576  		if fieldNum <= 0 {
   577  			return fmt.Errorf("proto: Span: illegal tag %d (wire type %d)", fieldNum, wire)
   578  		}
   579  		switch fieldNum {
   580  		case 1:
   581  			if wireType != 2 {
   582  				return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType)
   583  			}
   584  			var byteLen int
   585  			for shift := uint(0); ; shift += 7 {
   586  				if shift >= 64 {
   587  					return ErrIntOverflowSpanExpression
   588  				}
   589  				if iNdEx >= l {
   590  					return io.ErrUnexpectedEOF
   591  				}
   592  				b := dAtA[iNdEx]
   593  				iNdEx++
   594  				byteLen |= int(b&0x7F) << shift
   595  				if b < 0x80 {
   596  					break
   597  				}
   598  			}
   599  			if byteLen < 0 {
   600  				return ErrInvalidLengthSpanExpression
   601  			}
   602  			postIndex := iNdEx + byteLen
   603  			if postIndex < 0 {
   604  				return ErrInvalidLengthSpanExpression
   605  			}
   606  			if postIndex > l {
   607  				return io.ErrUnexpectedEOF
   608  			}
   609  			m.Start = append(m.Start[:0], dAtA[iNdEx:postIndex]...)
   610  			if m.Start == nil {
   611  				m.Start = []byte{}
   612  			}
   613  			iNdEx = postIndex
   614  		case 2:
   615  			if wireType != 2 {
   616  				return fmt.Errorf("proto: wrong wireType = %d for field End", wireType)
   617  			}
   618  			var byteLen int
   619  			for shift := uint(0); ; shift += 7 {
   620  				if shift >= 64 {
   621  					return ErrIntOverflowSpanExpression
   622  				}
   623  				if iNdEx >= l {
   624  					return io.ErrUnexpectedEOF
   625  				}
   626  				b := dAtA[iNdEx]
   627  				iNdEx++
   628  				byteLen |= int(b&0x7F) << shift
   629  				if b < 0x80 {
   630  					break
   631  				}
   632  			}
   633  			if byteLen < 0 {
   634  				return ErrInvalidLengthSpanExpression
   635  			}
   636  			postIndex := iNdEx + byteLen
   637  			if postIndex < 0 {
   638  				return ErrInvalidLengthSpanExpression
   639  			}
   640  			if postIndex > l {
   641  				return io.ErrUnexpectedEOF
   642  			}
   643  			m.End = append(m.End[:0], dAtA[iNdEx:postIndex]...)
   644  			if m.End == nil {
   645  				m.End = []byte{}
   646  			}
   647  			iNdEx = postIndex
   648  		default:
   649  			iNdEx = preIndex
   650  			skippy, err := skipSpanExpression(dAtA[iNdEx:])
   651  			if err != nil {
   652  				return err
   653  			}
   654  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   655  				return ErrInvalidLengthSpanExpression
   656  			}
   657  			if (iNdEx + skippy) > l {
   658  				return io.ErrUnexpectedEOF
   659  			}
   660  			iNdEx += skippy
   661  		}
   662  	}
   663  
   664  	if iNdEx > l {
   665  		return io.ErrUnexpectedEOF
   666  	}
   667  	return nil
   668  }
   669  func (m *SpanExpressionProto_Node) Unmarshal(dAtA []byte) error {
   670  	l := len(dAtA)
   671  	iNdEx := 0
   672  	for iNdEx < l {
   673  		preIndex := iNdEx
   674  		var wire uint64
   675  		for shift := uint(0); ; shift += 7 {
   676  			if shift >= 64 {
   677  				return ErrIntOverflowSpanExpression
   678  			}
   679  			if iNdEx >= l {
   680  				return io.ErrUnexpectedEOF
   681  			}
   682  			b := dAtA[iNdEx]
   683  			iNdEx++
   684  			wire |= uint64(b&0x7F) << shift
   685  			if b < 0x80 {
   686  				break
   687  			}
   688  		}
   689  		fieldNum := int32(wire >> 3)
   690  		wireType := int(wire & 0x7)
   691  		if wireType == 4 {
   692  			return fmt.Errorf("proto: Node: wiretype end group for non-group")
   693  		}
   694  		if fieldNum <= 0 {
   695  			return fmt.Errorf("proto: Node: illegal tag %d (wire type %d)", fieldNum, wire)
   696  		}
   697  		switch fieldNum {
   698  		case 1:
   699  			if wireType != 2 {
   700  				return fmt.Errorf("proto: wrong wireType = %d for field FactoredUnionSpans", wireType)
   701  			}
   702  			var msglen int
   703  			for shift := uint(0); ; shift += 7 {
   704  				if shift >= 64 {
   705  					return ErrIntOverflowSpanExpression
   706  				}
   707  				if iNdEx >= l {
   708  					return io.ErrUnexpectedEOF
   709  				}
   710  				b := dAtA[iNdEx]
   711  				iNdEx++
   712  				msglen |= int(b&0x7F) << shift
   713  				if b < 0x80 {
   714  					break
   715  				}
   716  			}
   717  			if msglen < 0 {
   718  				return ErrInvalidLengthSpanExpression
   719  			}
   720  			postIndex := iNdEx + msglen
   721  			if postIndex < 0 {
   722  				return ErrInvalidLengthSpanExpression
   723  			}
   724  			if postIndex > l {
   725  				return io.ErrUnexpectedEOF
   726  			}
   727  			m.FactoredUnionSpans = append(m.FactoredUnionSpans, SpanExpressionProto_Span{})
   728  			if err := m.FactoredUnionSpans[len(m.FactoredUnionSpans)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   729  				return err
   730  			}
   731  			iNdEx = postIndex
   732  		case 2:
   733  			if wireType != 0 {
   734  				return fmt.Errorf("proto: wrong wireType = %d for field Operator", wireType)
   735  			}
   736  			m.Operator = 0
   737  			for shift := uint(0); ; shift += 7 {
   738  				if shift >= 64 {
   739  					return ErrIntOverflowSpanExpression
   740  				}
   741  				if iNdEx >= l {
   742  					return io.ErrUnexpectedEOF
   743  				}
   744  				b := dAtA[iNdEx]
   745  				iNdEx++
   746  				m.Operator |= SetOperator(b&0x7F) << shift
   747  				if b < 0x80 {
   748  					break
   749  				}
   750  			}
   751  		case 3:
   752  			if wireType != 2 {
   753  				return fmt.Errorf("proto: wrong wireType = %d for field Left", wireType)
   754  			}
   755  			var msglen int
   756  			for shift := uint(0); ; shift += 7 {
   757  				if shift >= 64 {
   758  					return ErrIntOverflowSpanExpression
   759  				}
   760  				if iNdEx >= l {
   761  					return io.ErrUnexpectedEOF
   762  				}
   763  				b := dAtA[iNdEx]
   764  				iNdEx++
   765  				msglen |= int(b&0x7F) << shift
   766  				if b < 0x80 {
   767  					break
   768  				}
   769  			}
   770  			if msglen < 0 {
   771  				return ErrInvalidLengthSpanExpression
   772  			}
   773  			postIndex := iNdEx + msglen
   774  			if postIndex < 0 {
   775  				return ErrInvalidLengthSpanExpression
   776  			}
   777  			if postIndex > l {
   778  				return io.ErrUnexpectedEOF
   779  			}
   780  			if m.Left == nil {
   781  				m.Left = &SpanExpressionProto_Node{}
   782  			}
   783  			if err := m.Left.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   784  				return err
   785  			}
   786  			iNdEx = postIndex
   787  		case 4:
   788  			if wireType != 2 {
   789  				return fmt.Errorf("proto: wrong wireType = %d for field Right", wireType)
   790  			}
   791  			var msglen int
   792  			for shift := uint(0); ; shift += 7 {
   793  				if shift >= 64 {
   794  					return ErrIntOverflowSpanExpression
   795  				}
   796  				if iNdEx >= l {
   797  					return io.ErrUnexpectedEOF
   798  				}
   799  				b := dAtA[iNdEx]
   800  				iNdEx++
   801  				msglen |= int(b&0x7F) << shift
   802  				if b < 0x80 {
   803  					break
   804  				}
   805  			}
   806  			if msglen < 0 {
   807  				return ErrInvalidLengthSpanExpression
   808  			}
   809  			postIndex := iNdEx + msglen
   810  			if postIndex < 0 {
   811  				return ErrInvalidLengthSpanExpression
   812  			}
   813  			if postIndex > l {
   814  				return io.ErrUnexpectedEOF
   815  			}
   816  			if m.Right == nil {
   817  				m.Right = &SpanExpressionProto_Node{}
   818  			}
   819  			if err := m.Right.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
   820  				return err
   821  			}
   822  			iNdEx = postIndex
   823  		default:
   824  			iNdEx = preIndex
   825  			skippy, err := skipSpanExpression(dAtA[iNdEx:])
   826  			if err != nil {
   827  				return err
   828  			}
   829  			if (skippy < 0) || (iNdEx+skippy) < 0 {
   830  				return ErrInvalidLengthSpanExpression
   831  			}
   832  			if (iNdEx + skippy) > l {
   833  				return io.ErrUnexpectedEOF
   834  			}
   835  			iNdEx += skippy
   836  		}
   837  	}
   838  
   839  	if iNdEx > l {
   840  		return io.ErrUnexpectedEOF
   841  	}
   842  	return nil
   843  }
   844  func skipSpanExpression(dAtA []byte) (n int, err error) {
   845  	l := len(dAtA)
   846  	iNdEx := 0
   847  	depth := 0
   848  	for iNdEx < l {
   849  		var wire uint64
   850  		for shift := uint(0); ; shift += 7 {
   851  			if shift >= 64 {
   852  				return 0, ErrIntOverflowSpanExpression
   853  			}
   854  			if iNdEx >= l {
   855  				return 0, io.ErrUnexpectedEOF
   856  			}
   857  			b := dAtA[iNdEx]
   858  			iNdEx++
   859  			wire |= (uint64(b) & 0x7F) << shift
   860  			if b < 0x80 {
   861  				break
   862  			}
   863  		}
   864  		wireType := int(wire & 0x7)
   865  		switch wireType {
   866  		case 0:
   867  			for shift := uint(0); ; shift += 7 {
   868  				if shift >= 64 {
   869  					return 0, ErrIntOverflowSpanExpression
   870  				}
   871  				if iNdEx >= l {
   872  					return 0, io.ErrUnexpectedEOF
   873  				}
   874  				iNdEx++
   875  				if dAtA[iNdEx-1] < 0x80 {
   876  					break
   877  				}
   878  			}
   879  		case 1:
   880  			iNdEx += 8
   881  		case 2:
   882  			var length int
   883  			for shift := uint(0); ; shift += 7 {
   884  				if shift >= 64 {
   885  					return 0, ErrIntOverflowSpanExpression
   886  				}
   887  				if iNdEx >= l {
   888  					return 0, io.ErrUnexpectedEOF
   889  				}
   890  				b := dAtA[iNdEx]
   891  				iNdEx++
   892  				length |= (int(b) & 0x7F) << shift
   893  				if b < 0x80 {
   894  					break
   895  				}
   896  			}
   897  			if length < 0 {
   898  				return 0, ErrInvalidLengthSpanExpression
   899  			}
   900  			iNdEx += length
   901  		case 3:
   902  			depth++
   903  		case 4:
   904  			if depth == 0 {
   905  				return 0, ErrUnexpectedEndOfGroupSpanExpression
   906  			}
   907  			depth--
   908  		case 5:
   909  			iNdEx += 4
   910  		default:
   911  			return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
   912  		}
   913  		if iNdEx < 0 {
   914  			return 0, ErrInvalidLengthSpanExpression
   915  		}
   916  		if depth == 0 {
   917  			return iNdEx, nil
   918  		}
   919  	}
   920  	return 0, io.ErrUnexpectedEOF
   921  }
   922  
   923  var (
   924  	ErrInvalidLengthSpanExpression        = fmt.Errorf("proto: negative length found during unmarshaling")
   925  	ErrIntOverflowSpanExpression          = fmt.Errorf("proto: integer overflow")
   926  	ErrUnexpectedEndOfGroupSpanExpression = fmt.Errorf("proto: unexpected end of group")
   927  )
   928