diff --git a/go.mod b/go.mod index c965346e9..a29066719 100644 --- a/go.mod +++ b/go.mod @@ -151,6 +151,7 @@ require ( github.com/hashicorp/raft v1.6.1 github.com/hashicorp/raft-boltdb/v2 v2.3.0 github.com/orcaman/concurrent-map/v2 v2.0.1 + github.com/parquet-go/parquet-go v0.20.1 github.com/rabbitmq/amqp091-go v1.9.0 github.com/rclone/rclone v1.66.0 github.com/rdleal/intervalst v1.3.0 @@ -187,6 +188,7 @@ require ( github.com/PuerkitoBio/goquery v1.8.1 // indirect github.com/Unknwon/goconfig v1.0.0 // indirect github.com/abbot/go-http-auth v0.4.0 // indirect + github.com/andybalholm/brotli v1.0.5 // indirect github.com/andybalholm/cascadia v1.3.2 // indirect github.com/arangodb/go-velocypack v0.0.0-20200318135517-5af53c29c67e // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.1 // indirect @@ -270,6 +272,7 @@ require ( github.com/nats-io/nkeys v0.4.7 // indirect github.com/nats-io/nuid v1.0.1 // indirect github.com/ncw/swift/v2 v2.0.2 // indirect + github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/onsi/gomega v1.27.10 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/oracle/oci-go-sdk/v65 v65.55.1 // indirect @@ -277,7 +280,7 @@ require ( github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/pengsrc/go-shared v0.2.1-0.20190131101655-1999055a4a14 // indirect github.com/philhofer/fwd v1.1.2 // indirect - github.com/pierrec/lz4/v4 v4.1.17 // indirect + github.com/pierrec/lz4/v4 v4.1.18 // indirect github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c // indirect github.com/pingcap/failpoint v0.0.0-20220801062533-2eaa32854a6c // indirect github.com/pingcap/kvproto v0.0.0-20230403051650-e166ae588106 // indirect @@ -292,6 +295,7 @@ require ( github.com/rivo/uniseg v0.4.7 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect + github.com/segmentio/encoding v0.3.6 // indirect github.com/shoenig/go-m1cpu v0.1.6 // indirect github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966 // indirect github.com/smartystreets/goconvey v1.8.1 // indirect diff --git a/go.sum b/go.sum index 9cce26431..9ef8291cf 100644 --- a/go.sum +++ b/go.sum @@ -124,6 +124,8 @@ github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuy github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= +github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/andybalholm/cascadia v1.3.2 h1:3Xi6Dw5lHF15JtdcmAHD3i1+T8plmv7BQ/nsViSLyss= github.com/andybalholm/cascadia v1.3.2/go.mod h1:7gtRlve5FxPPgIgX36uWBX58OdBsSS6lUvCFb+h7KvU= @@ -545,6 +547,8 @@ github.com/henrybear327/Proton-API-Bridge v1.0.0 h1:gjKAaWfKu++77WsZTHg6FUyPC5W0 github.com/henrybear327/Proton-API-Bridge v1.0.0/go.mod h1:gunH16hf6U74W2b9CGDaWRadiLICsoJ6KRkSt53zLts= github.com/henrybear327/go-proton-api v1.0.0 h1:zYi/IbjLwFAW7ltCeqXneUGJey0TN//Xo851a/BgLXw= github.com/henrybear327/go-proton-api v1.0.0/go.mod h1:w63MZuzufKcIZ93pwRgiOtxMXYafI8H74D77AxytOBc= +github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= +github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jcmturner/aescts/v2 v2.0.0 h1:9YKLH6ey7H4eDBXW8khjYslgyqG2xZikXP0EQFKrle8= @@ -653,6 +657,7 @@ github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/ github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= +github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v2.0.1+incompatible h1:xQ15muvnzGBHpIpdrNi1DA5x0+TcBZzsIDwmw9uTHzw= @@ -693,6 +698,8 @@ github.com/ncw/swift/v2 v2.0.2 h1:jx282pcAKFhmoZBSdMcCRFn9VWkoBIRsCpe+yZq7vEk= github.com/ncw/swift/v2 v2.0.2/go.mod h1:z0A9RVdYPjNjXVo2pDOPxZ4eu3oarO1P91fTItcb+Kg= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/olivere/elastic/v7 v7.0.32 h1:R7CXvbu8Eq+WlsLgxmKVKPox0oOwAE/2T9Si5BnvK6E= github.com/olivere/elastic/v7 v7.0.32/go.mod h1:c7PVmLe3Fxq77PIfY/bZmxY/TAamBhCzZ8xDOE09a9k= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -711,6 +718,8 @@ github.com/oracle/oci-go-sdk/v65 v65.55.1 h1:82j4YHtqeJJiOPyLKxP4/x3Oi8tv2o1etKM github.com/oracle/oci-go-sdk/v65 v65.55.1/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0= github.com/orcaman/concurrent-map/v2 v2.0.1 h1:jOJ5Pg2w1oeB6PeDurIYf6k9PQ+aTITr/6lP/L/zp6c= github.com/orcaman/concurrent-map/v2 v2.0.1/go.mod h1:9Eq3TG2oBe5FirmYWQfYO5iH1q0Jv47PLaNK++uCdOM= +github.com/parquet-go/parquet-go v0.20.1 h1:r5UqeMqyH2DrahZv6dlT41hH2NpS2F8atJWmX1ST1/U= +github.com/parquet-go/parquet-go v0.20.1/go.mod h1:4YfUo8TkoGoqwzhA/joZKZ8f77wSMShOLHESY4Ys0bY= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= @@ -723,8 +732,8 @@ github.com/peterh/liner v1.2.2 h1:aJ4AOodmL+JxOZZEL2u9iJf8omNRpqHc/EbrK+3mAXw= github.com/peterh/liner v1.2.2/go.mod h1:xFwJyiKIXJZUKItq5dGHZSTBRAuG/CpeNpWLyiNRNwI= github.com/philhofer/fwd v1.1.2 h1:bnDivRJ1EWPjUIRXV5KfORO897HTbpFAQddBdE8t7Gw= github.com/philhofer/fwd v1.1.2/go.mod h1:qkPdfjR2SIEbspLqpe1tO4n5yICnr2DY7mqEx2tUTP0= -github.com/pierrec/lz4/v4 v4.1.17 h1:kV4Ip+/hUBC+8T6+2EgburRtkE9ef4nbY3f4dFhGjMc= -github.com/pierrec/lz4/v4 v4.1.17/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.18 h1:xaKrnTkyoqfh1YItXl56+6KJNVYWlEEPuAQW9xsplYQ= +github.com/pierrec/lz4/v4 v4.1.18/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pingcap/errors v0.11.0/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= github.com/pingcap/errors v0.11.5-0.20211224045212-9687c2b0f87c h1:xpW9bvK+HuuTmyFqUwr+jcCvpVkK7sumiz+ko5H9eq4= @@ -827,6 +836,9 @@ github.com/seaweedfs/raft v1.1.3 h1:5B6hgneQ7IuU4Ceom/f6QUt8pEeqjcsRo+IxlyPZCws= github.com/seaweedfs/raft v1.1.3/go.mod h1:9cYlEBA+djJbnf/5tWsCybtbL7ICYpi+Uxcg3MxjuNs= github.com/secsy/goftp v0.0.0-20200609142545-aa2de14babf4 h1:PT+ElG/UUFMfqy5HrxJxNzj3QBOf7dZwupeVC+mG1Lo= github.com/secsy/goftp v0.0.0-20200609142545-aa2de14babf4/go.mod h1:MnkX001NG75g3p8bhFycnyIjeQoOjGL6CEIsdE/nKSY= +github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= +github.com/segmentio/encoding v0.3.6 h1:E6lVLyDPseWEulBmCmAKPanDd3jiyGDo5gMcugCRwZQ= +github.com/segmentio/encoding v0.3.6/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shirou/gopsutil/v3 v3.24.3 h1:eoUGJSmdfLzJ3mxIhmOAhgKEKgQkeOwKpz1NbhVnuPE= github.com/shirou/gopsutil/v3 v3.24.3/go.mod h1:JpND7O217xa72ewWz9zN2eIIkPWsDN/3pl0H8Qt0uwg= @@ -1229,6 +1241,7 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211110154304-99a53858aa08/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220408201424-a24fb2fb8a0f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/weed/mq/schema/schema.go b/weed/mq/schema/schema.go index 5cb7a8df1..72064f5d7 100644 --- a/weed/mq/schema/schema.go +++ b/weed/mq/schema/schema.go @@ -1,32 +1,26 @@ package schema import ( - "fmt" "github.com/seaweedfs/seaweedfs/weed/pb/schema_pb" ) type Schema struct { RecordType *schema_pb.RecordType - indexedFields []*schema_pb.Field + fieldMap map[string]*schema_pb.Field } func NewSchema(recordType *schema_pb.RecordType) (*Schema, error) { - var indexedFields []*schema_pb.Field - var largestIndex int32 + var fieldMap map[string]*schema_pb.Field for _, field := range recordType.Fields { - if field.Index > largestIndex { - largestIndex = field.Index - } - if field.Index < 0 { - return nil, fmt.Errorf("field %s index %d is negative", field.Name, field.Index) - } - } - indexedFields = make([]*schema_pb.Field, largestIndex+1) - for _, field := range recordType.Fields { - indexedFields[field.Index] = field + fieldMap[field.Name] = field } return &Schema{ RecordType: recordType, - indexedFields: indexedFields, + fieldMap: fieldMap, }, nil } + +func (s *Schema) GetField(name string) (*schema_pb.Field, bool) { + field, ok := s.fieldMap[name] + return field, ok +} diff --git a/weed/mq/schema/to_parquet_schema.go b/weed/mq/schema/to_parquet_schema.go new file mode 100644 index 000000000..f39692714 --- /dev/null +++ b/weed/mq/schema/to_parquet_schema.go @@ -0,0 +1,65 @@ +package schema + +import ( + "fmt" + parquet "github.com/parquet-go/parquet-go" + "github.com/seaweedfs/seaweedfs/weed/pb/schema_pb" +) + +func ToParquetSchema(topicName string, recordType *schema_pb.RecordType) (*parquet.Schema, error) { + rootNode, err := toParquetFieldTypeRecord(recordType) + if err != nil { + return nil, fmt.Errorf("failed to convert record type to parquet schema: %v", err) + } + + return parquet.NewSchema(topicName, rootNode), nil +} + +func toParquetFieldType(field *schema_pb.Field) (parquet.Node, error) { + var ( + dataType parquet.Node + err error + ) + switch field.Type.Kind.(type) { + case *schema_pb.Type_ScalarType: + dataType, err = toParquetFieldTypeScalar(field.Type.GetScalarType()) + case *schema_pb.Type_RecordType: + dataType, err = toParquetFieldTypeRecord(field.Type.GetRecordType()) + default: + return nil, fmt.Errorf("unknown field type: %T", field.Type.Kind) + } + + return dataType, err +} + +func toParquetFieldTypeScalar(scalarType schema_pb.ScalarType) (parquet.Node, error) { + switch scalarType { + case schema_pb.ScalarType_BOOLEAN: + return parquet.Leaf(parquet.BooleanType), nil + case schema_pb.ScalarType_INTEGER: + return parquet.Leaf(parquet.Int32Type), nil + case schema_pb.ScalarType_LONG: + return parquet.Leaf(parquet.Int64Type), nil + case schema_pb.ScalarType_FLOAT: + return parquet.Leaf(parquet.FloatType), nil + case schema_pb.ScalarType_DOUBLE: + return parquet.Leaf(parquet.DoubleType), nil + case schema_pb.ScalarType_BYTES: + return parquet.Leaf(parquet.ByteArrayType), nil + case schema_pb.ScalarType_STRING: + return parquet.String(), nil + default: + return nil, fmt.Errorf("unknown scalar type: %v", scalarType) + } +} +func toParquetFieldTypeRecord(recordType *schema_pb.RecordType) (parquet.Node, error) { + recordNode := parquet.Group{} + for _, field := range recordType.Fields { + parquetFieldType, err := toParquetFieldType(field) + if err != nil { + return nil, err + } + recordNode[field.Name] = parquetFieldType + } + return recordNode, nil +} diff --git a/weed/mq/schema/to_parquet_value.go b/weed/mq/schema/to_parquet_value.go new file mode 100644 index 000000000..8041da3ad --- /dev/null +++ b/weed/mq/schema/to_parquet_value.go @@ -0,0 +1,86 @@ +package schema + +import ( + "fmt" + parquet "github.com/parquet-go/parquet-go" + "github.com/seaweedfs/seaweedfs/weed/pb/schema_pb" +) + + +func AddRecordValue(rowBuilder *parquet.RowBuilder, fieldType *schema_pb.Type, fieldValue *schema_pb.Value) error { + visitor := func(fieldType *schema_pb.Type, fieldValue *schema_pb.Value, index int) error { + switch fieldType.Kind.(type) { + case *schema_pb.Type_ScalarType: + parquetValue, err := toParquetValue(fieldValue) + if err != nil { + return err + } + rowBuilder.Add(index, parquetValue) + } + return nil + } + return visitValue(fieldType, fieldValue, visitor) +} + +// typeValueVisitor is a function that is called for each value in a schema_pb.Value +// Find the column index. +// intended to be used in RowBuilder.Add(columnIndex, value) +type typeValueVisitor func(fieldType *schema_pb.Type, fieldValue *schema_pb.Value, index int) error + +func visitValue(fieldType *schema_pb.Type, fieldValue *schema_pb.Value, visitor typeValueVisitor) (err error) { + _, err = doVisitValue(fieldType, fieldValue, 0, visitor) + return +} + +// endIndex is exclusive +// same logic as RowBuilder.configure in row_builder.go +func doVisitValue(fieldType *schema_pb.Type, fieldValue *schema_pb.Value, columnIndex int, visitor typeValueVisitor) (endIndex int, err error) { + switch fieldType.Kind.(type) { + case *schema_pb.Type_ScalarType: + return columnIndex+1, visitor(fieldType, fieldValue, columnIndex) + case *schema_pb.Type_ListType: + for _, value := range fieldValue.GetListValue().Values { + err = visitor(fieldType, value, columnIndex) + if err != nil { + return + } + } + return columnIndex+1, nil + case *schema_pb.Type_RecordType: + for _, field := range fieldType.GetRecordType().Fields { + fieldValue, found := fieldValue.GetRecordValue().Fields[field.Name] + if !found { + // TODO check this if no such field found + return columnIndex, nil + } + endIndex, err = doVisitValue(field.Type, fieldValue, columnIndex, visitor) + if err != nil { + return + } + columnIndex = endIndex + } + return + } + return +} + +func toParquetValue(value *schema_pb.Value) (parquet.Value, error) { + switch value.Kind.(type) { + case *schema_pb.Value_BoolValue: + return parquet.BooleanValue(value.GetBoolValue()), nil + case *schema_pb.Value_Int32Value: + return parquet.Int32Value(value.GetInt32Value()), nil + case *schema_pb.Value_Int64Value: + return parquet.Int64Value(value.GetInt64Value()), nil + case *schema_pb.Value_FloatValue: + return parquet.FloatValue(value.GetFloatValue()), nil + case *schema_pb.Value_DoubleValue: + return parquet.DoubleValue(value.GetDoubleValue()), nil + case *schema_pb.Value_BytesValue: + return parquet.ByteArrayValue(value.GetBytesValue()), nil + case *schema_pb.Value_StringValue: + return parquet.ByteArrayValue([]byte(value.GetStringValue())), nil + default: + return parquet.NullValue(), fmt.Errorf("unknown value type: %T", value.Kind) + } +} diff --git a/weed/pb/schema.proto b/weed/pb/schema.proto index 074db9135..b45a390d3 100644 --- a/weed/pb/schema.proto +++ b/weed/pb/schema.proto @@ -23,6 +23,7 @@ message Type { oneof kind { ScalarType scalar_type = 1; RecordType record_type = 2; + ListType list_type = 3; } } @@ -36,6 +37,10 @@ enum ScalarType { STRING = 7; } +message ListType { + Type element_type = 1; +} + /////////////////////////// // value definition /////////////////////////// @@ -51,6 +56,10 @@ message Value { double double_value = 5; bytes bytes_value = 6; string string_value = 7; + ListValue list_value = 14; RecordValue record_value = 15; } } +message ListValue { + repeated Value values = 1; +} diff --git a/weed/pb/schema_pb/schema.pb.go b/weed/pb/schema_pb/schema.pb.go index 661d96be5..e50ae93ad 100644 --- a/weed/pb/schema_pb/schema.pb.go +++ b/weed/pb/schema_pb/schema.pb.go @@ -208,6 +208,7 @@ type Type struct { // // *Type_ScalarType // *Type_RecordType + // *Type_ListType Kind isType_Kind `protobuf_oneof:"kind"` } @@ -264,6 +265,13 @@ func (x *Type) GetRecordType() *RecordType { return nil } +func (x *Type) GetListType() *ListType { + if x, ok := x.GetKind().(*Type_ListType); ok { + return x.ListType + } + return nil +} + type isType_Kind interface { isType_Kind() } @@ -273,24 +281,29 @@ type Type_ScalarType struct { } type Type_RecordType struct { - RecordType *RecordType `protobuf:"bytes,2,opt,name=record_type,json=recordType,proto3,oneof"` // MapType map_type = 3; + RecordType *RecordType `protobuf:"bytes,2,opt,name=record_type,json=recordType,proto3,oneof"` +} + +type Type_ListType struct { + ListType *ListType `protobuf:"bytes,3,opt,name=list_type,json=listType,proto3,oneof"` } func (*Type_ScalarType) isType_Kind() {} func (*Type_RecordType) isType_Kind() {} -type MapType struct { +func (*Type_ListType) isType_Kind() {} + +type ListType struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // key is always string - Value *Type `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` + ElementType *Type `protobuf:"bytes,1,opt,name=element_type,json=elementType,proto3" json:"element_type,omitempty"` } -func (x *MapType) Reset() { - *x = MapType{} +func (x *ListType) Reset() { + *x = ListType{} if protoimpl.UnsafeEnabled { mi := &file_schema_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -298,13 +311,13 @@ func (x *MapType) Reset() { } } -func (x *MapType) String() string { +func (x *ListType) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MapType) ProtoMessage() {} +func (*ListType) ProtoMessage() {} -func (x *MapType) ProtoReflect() protoreflect.Message { +func (x *ListType) ProtoReflect() protoreflect.Message { mi := &file_schema_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -316,14 +329,14 @@ func (x *MapType) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use MapType.ProtoReflect.Descriptor instead. -func (*MapType) Descriptor() ([]byte, []int) { +// Deprecated: Use ListType.ProtoReflect.Descriptor instead. +func (*ListType) Descriptor() ([]byte, []int) { return file_schema_proto_rawDescGZIP(), []int{3} } -func (x *MapType) GetValue() *Type { +func (x *ListType) GetElementType() *Type { if x != nil { - return x.Value + return x.ElementType } return nil } @@ -392,6 +405,7 @@ type Value struct { // *Value_DoubleValue // *Value_BytesValue // *Value_StringValue + // *Value_ListValue // *Value_RecordValue Kind isValue_Kind `protobuf_oneof:"kind"` } @@ -484,6 +498,13 @@ func (x *Value) GetStringValue() string { return "" } +func (x *Value) GetListValue() *ListValue { + if x, ok := x.GetKind().(*Value_ListValue); ok { + return x.ListValue + } + return nil +} + func (x *Value) GetRecordValue() *RecordValue { if x, ok := x.GetKind().(*Value_RecordValue); ok { return x.RecordValue @@ -523,6 +544,10 @@ type Value_StringValue struct { StringValue string `protobuf:"bytes,7,opt,name=string_value,json=stringValue,proto3,oneof"` } +type Value_ListValue struct { + ListValue *ListValue `protobuf:"bytes,14,opt,name=list_value,json=listValue,proto3,oneof"` +} + type Value_RecordValue struct { RecordValue *RecordValue `protobuf:"bytes,15,opt,name=record_value,json=recordValue,proto3,oneof"` } @@ -541,8 +566,57 @@ func (*Value_BytesValue) isValue_Kind() {} func (*Value_StringValue) isValue_Kind() {} +func (*Value_ListValue) isValue_Kind() {} + func (*Value_RecordValue) isValue_Kind() {} +type ListValue struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Values []*Value `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (x *ListValue) Reset() { + *x = ListValue{} + if protoimpl.UnsafeEnabled { + mi := &file_schema_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListValue) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListValue) ProtoMessage() {} + +func (x *ListValue) ProtoReflect() protoreflect.Message { + mi := &file_schema_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListValue.ProtoReflect.Descriptor instead. +func (*ListValue) Descriptor() ([]byte, []int) { + return file_schema_proto_rawDescGZIP(), []int{6} +} + +func (x *ListValue) GetValues() []*Value { + if x != nil { + return x.Values + } + return nil +} + var File_schema_proto protoreflect.FileDescriptor var file_schema_proto_rawDesc = []byte{ @@ -558,7 +632,7 @@ var file_schema_proto_rawDesc = []byte{ 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, - 0x69, 0x73, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0x82, 0x01, 0x0a, 0x04, 0x54, + 0x69, 0x73, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x22, 0xb6, 0x01, 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x54, 0x79, 0x70, 0x65, 0x48, @@ -566,40 +640,51 @@ var file_schema_proto_rawDesc = []byte{ 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, - 0x30, 0x0a, 0x07, 0x4d, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, - 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, 0x75, - 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, 0x4b, 0x0a, - 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x26, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, - 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc3, 0x02, 0x0a, 0x05, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, 0x6f, 0x6c, - 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x5f, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0a, 0x69, 0x6e, - 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x36, - 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, - 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x66, - 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, - 0x48, 0x00, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, - 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x79, 0x74, 0x65, - 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, - 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x72, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x52, 0x65, - 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, + 0x6f, 0x72, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x48, + 0x00, 0x52, 0x08, 0x6c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, + 0x69, 0x6e, 0x64, 0x22, 0x3e, 0x0a, 0x08, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x32, 0x0a, 0x0c, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, + 0x62, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, + 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x1a, + 0x4b, 0x0a, 0x0b, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xfa, 0x02, 0x0a, + 0x05, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1f, 0x0a, 0x0a, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x09, 0x62, 0x6f, + 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, 0x74, 0x33, 0x32, + 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x0a, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x69, 0x6e, + 0x74, 0x36, 0x34, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x48, + 0x00, 0x52, 0x0a, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, + 0x0b, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x02, 0x48, 0x00, 0x52, 0x0a, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x23, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, 0x0b, 0x62, 0x79, 0x74, 0x65, 0x73, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x0a, 0x62, 0x79, + 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x23, 0x0a, 0x0c, 0x73, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, + 0x52, 0x0b, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x35, 0x0a, + 0x0a, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x00, 0x52, 0x09, 0x6c, 0x69, 0x73, 0x74, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x3b, 0x0a, 0x0c, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x5f, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x73, 0x63, 0x68, + 0x65, 0x6d, 0x61, 0x5f, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x42, 0x06, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x22, 0x35, 0x0a, 0x09, 0x4c, 0x69, 0x73, + 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, + 0x70, 0x62, 0x2e, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2a, 0x5e, 0x0a, 0x0a, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x42, 0x4f, 0x4f, 0x4c, 0x45, 0x41, 0x4e, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x54, 0x45, 0x47, 0x45, 0x52, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x4e, 0x47, @@ -625,31 +710,35 @@ func file_schema_proto_rawDescGZIP() []byte { } var file_schema_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_schema_proto_goTypes = []interface{}{ (ScalarType)(0), // 0: schema_pb.ScalarType (*RecordType)(nil), // 1: schema_pb.RecordType (*Field)(nil), // 2: schema_pb.Field (*Type)(nil), // 3: schema_pb.Type - (*MapType)(nil), // 4: schema_pb.MapType + (*ListType)(nil), // 4: schema_pb.ListType (*RecordValue)(nil), // 5: schema_pb.RecordValue (*Value)(nil), // 6: schema_pb.Value - nil, // 7: schema_pb.RecordValue.FieldsEntry + (*ListValue)(nil), // 7: schema_pb.ListValue + nil, // 8: schema_pb.RecordValue.FieldsEntry } var file_schema_proto_depIdxs = []int32{ - 2, // 0: schema_pb.RecordType.fields:type_name -> schema_pb.Field - 3, // 1: schema_pb.Field.type:type_name -> schema_pb.Type - 0, // 2: schema_pb.Type.scalar_type:type_name -> schema_pb.ScalarType - 1, // 3: schema_pb.Type.record_type:type_name -> schema_pb.RecordType - 3, // 4: schema_pb.MapType.value:type_name -> schema_pb.Type - 7, // 5: schema_pb.RecordValue.fields:type_name -> schema_pb.RecordValue.FieldsEntry - 5, // 6: schema_pb.Value.record_value:type_name -> schema_pb.RecordValue - 6, // 7: schema_pb.RecordValue.FieldsEntry.value:type_name -> schema_pb.Value - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 2, // 0: schema_pb.RecordType.fields:type_name -> schema_pb.Field + 3, // 1: schema_pb.Field.type:type_name -> schema_pb.Type + 0, // 2: schema_pb.Type.scalar_type:type_name -> schema_pb.ScalarType + 1, // 3: schema_pb.Type.record_type:type_name -> schema_pb.RecordType + 4, // 4: schema_pb.Type.list_type:type_name -> schema_pb.ListType + 3, // 5: schema_pb.ListType.element_type:type_name -> schema_pb.Type + 8, // 6: schema_pb.RecordValue.fields:type_name -> schema_pb.RecordValue.FieldsEntry + 7, // 7: schema_pb.Value.list_value:type_name -> schema_pb.ListValue + 5, // 8: schema_pb.Value.record_value:type_name -> schema_pb.RecordValue + 6, // 9: schema_pb.ListValue.values:type_name -> schema_pb.Value + 6, // 10: schema_pb.RecordValue.FieldsEntry.value:type_name -> schema_pb.Value + 11, // [11:11] is the sub-list for method output_type + 11, // [11:11] is the sub-list for method input_type + 11, // [11:11] is the sub-list for extension type_name + 11, // [11:11] is the sub-list for extension extendee + 0, // [0:11] is the sub-list for field type_name } func init() { file_schema_proto_init() } @@ -695,7 +784,7 @@ func file_schema_proto_init() { } } file_schema_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MapType); i { + switch v := v.(*ListType); i { case 0: return &v.state case 1: @@ -730,10 +819,23 @@ func file_schema_proto_init() { return nil } } + file_schema_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListValue); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_schema_proto_msgTypes[2].OneofWrappers = []interface{}{ (*Type_ScalarType)(nil), (*Type_RecordType)(nil), + (*Type_ListType)(nil), } file_schema_proto_msgTypes[5].OneofWrappers = []interface{}{ (*Value_BoolValue)(nil), @@ -743,6 +845,7 @@ func file_schema_proto_init() { (*Value_DoubleValue)(nil), (*Value_BytesValue)(nil), (*Value_StringValue)(nil), + (*Value_ListValue)(nil), (*Value_RecordValue)(nil), } type x struct{} @@ -751,7 +854,7 @@ func file_schema_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_schema_proto_rawDesc, NumEnums: 1, - NumMessages: 7, + NumMessages: 8, NumExtensions: 0, NumServices: 0, },