wu-sheng commented on code in PR #863:
URL:
https://github.com/apache/skywalking-banyandb/pull/863#discussion_r2562035468
##########
api/proto/banyandb/measure/v1/write.proto:
##########
@@ -27,13 +27,29 @@ import "validate/validate.proto";
option go_package =
"github.com/apache/skywalking-banyandb/api/proto/banyandb/measure/v1";
option java_package = "org.apache.skywalking.banyandb.measure.v1";
+// TagFamilySpec defines the specification of a tag family.
+message TagFamilySpec {
+ // name of the tag family
+ string name = 1;
+ // names of tags in the tag family
+ repeated string tag_names = 2;
+}
+
+// DataPointSpec defines the specification of a data point.
+message DataPointSpec {
+ // the tag family specification
+ repeated TagFamilySpec tag_family_spec = 1;
+ // the field names
+ repeated string field_names = 2;
+}
+
// DataPointValue is the data point for writing. It only contains values.
message DataPointValue {
// timestamp is in the timeunit of milliseconds.
google.protobuf.Timestamp timestamp = 1 [(validate.rules).timestamp.required
= true];
- // the order of tag_families' items match the measure schema
+ // the order of tag_families' items match DataPointSpec if provided,
otherwise match the measure schema
Review Comment:
@hanahmily told me, you two wanted to use compatible mode when the first row
of bulk doesn't have spec info. Then, it should be fine.
There are 2 cases now
- Expected new style
```
-- In Bulk A
spec: tag1, tag2, tag3, field 1, field2
data1: data point value1
data2: data point value2
data3: data point value3
data3: data point value4
```
- Historic and compatible style
```
-- In Bulk B
#no spec field in row1
data1: data point value1
data2: data point value2
data3: data point value3
data3: data point value4
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]