Skip to content

Commit

Permalink
[OSPP] Submitted the delta and cumulative API design plan, (#478)
Browse files Browse the repository at this point in the history
* [OSPP] Submitted the delta and cumulative API design plan, which has passed the lint check

* Update write.proto

* fix the check

---------

Co-authored-by: Gao Hongtao <[email protected]>
  • Loading branch information
sumingfirst and hanahmily authored Jul 2, 2024
1 parent c5f67ab commit e721073
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/proto/banyandb/measure/v1/write.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ message DataPointValue {
repeated model.v1.FieldValue fields = 3;
// the version of the data point
int64 version = 4;
// the type of the data point cumulative or delta
enum Type {
// TYPE_UNSPECIFIED is the default value.
TYPE_UNSPECIFIED = 0;
// TYPE_CUMULATIVE is the cumulative data
TYPE_CUMULATIVE = 1;
// TYPE_DELTA is the delta data
TYPE_DELTA = 2;
}
Type type = 5;
}

// WriteRequest is the request contract for write
Expand Down
16 changes: 16 additions & 0 deletions docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@
- [WriteRequest](#banyandb-measure-v1-WriteRequest)
- [WriteResponse](#banyandb-measure-v1-WriteResponse)

- [DataPointValue.Type](#banyandb-measure-v1-DataPointValue-Type)

- [banyandb/measure/v1/rpc.proto](#banyandb_measure_v1_rpc-proto)
- [MeasureService](#banyandb-measure-v1-MeasureService)

Expand Down Expand Up @@ -2640,6 +2642,7 @@ DataPointValue is the data point for writing. It only contains values.
| tag_families | [banyandb.model.v1.TagFamilyForWrite](#banyandb-model-v1-TagFamilyForWrite) | repeated | the order of tag_families&#39; items match the measure schema |
| fields | [banyandb.model.v1.FieldValue](#banyandb-model-v1-FieldValue) | repeated | the order of fields match the measure schema |
| version | [int64](#int64) | | the version of the data point |
| type | [DataPointValue.Type](#banyandb-measure-v1-DataPointValue-Type) | | |



Expand Down Expand Up @@ -2699,6 +2702,19 @@ WriteResponse is the response contract for write




<a name="banyandb-measure-v1-DataPointValue-Type"></a>

### DataPointValue.Type
the type of the data point cumulative or delta

| Name | Number | Description |
| ---- | ------ | ----------- |
| TYPE_UNSPECIFIED | 0 | TYPE_UNSPECIFIED is the default value. |
| TYPE_CUMULATIVE | 1 | TYPE_CUMULATIVE is the cumulative data |
| TYPE_DELTA | 2 | TYPE_DELTA is the delta data |





Expand Down

0 comments on commit e721073

Please sign in to comment.