wu-sheng commented on code in PR #863:
URL: 
https://github.com/apache/skywalking-banyandb/pull/863#discussion_r2560460061


##########
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 Do you want to keep backward compatibility? So we could skip 
data_point_spec?
   
   The tricky point is, if you want to improve performance, we only should set 
`data_point_spec` for the first row of a part of bulk, e.g.
   
   ```
   -- In Bulk A
   spec: tag1, tag2, tag3, field 1, field2
   data1: data point value1
   data2: data point value2
   data3: data point value3
   spec2: tag1, tag3, tag4, field 2, field5
   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]

Reply via email to