lujiajing1126 commented on a change in pull request #2:
URL: https://github.com/apache/skywalking-banyandb/pull/2#discussion_r637984738



##########
File path: api/fbs/v1/query.fbs
##########
@@ -0,0 +1,106 @@
+// Licensed to Apache Software Foundation (ASF) under one or more contributor
+// license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright
+// ownership. Apache Software Foundation (ASF) licenses this file to you under
+// the Apache License, Version 2.0 (the "License"); you may
+// not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+namespace v1;
+
+// BinaryOp specify the operation imposed to the given query condition
+enum BinaryOp: byte {
+    EQ,
+    NE,
+    LT,
+    GT,
+    LE,
+    GE,
+    HAVING,
+    NOT_HAVING,
+    RANGE
+}
+
+// ByteValue is the byte-representation of the value of a Tag
+table ByteValue {
+    value: [ubyte];
+}
+
+// Tag is the building block of a record which is equivalent to a key-value 
pair.
+// In the context of Trace, it could be metadata of a trace such as 
service_name, serivce_instance, etc.
+// Besides, other fields/tags are organized in key-value pair in the 
underlying storage layer.
+// One should notice that the values can be a multi-value.
+table Tag {
+    key: [ubyte];
+    values: [ByteValue];
+}
+
+// TagQuery consists of the query condition with a binary operator to be 
imposed
+table TagQuery {
+    op: BinaryOp;
+    condition: Tag;
+}
+
+// Sort is either descending or ascending
+enum Sort : byte {
+    DESC,
+    ASC
+}
+
+// QueryOrder means a Sort operation to be done for a given field.
+// The field can be only the type of Integer.
+table QueryOrder {
+    field_name: string;
+    sort: Sort;
+}
+
+// Entity represents a Span defined in Google Dapper paper.
+// Or equivalently a Segment in Skywalking.
+table Entity {
+// entity_id could be span_id of a Span or segment_id of a Segment

Review comment:
       Fixed




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to