StLeoX commented on code in PR #521:
URL: 
https://github.com/apache/skywalking-banyandb/pull/521#discussion_r1730516032


##########
banyand/measure/aggregate/aggregate_function.go:
##########
@@ -0,0 +1,97 @@
+// 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.
+
+// Package aggregate for measure aggregate function.
+package aggregate
+
+import (
+       "fmt"
+       "math"
+
+       modelv1 
"github.com/apache/skywalking-banyandb/api/proto/banyandb/model/v1"
+)
+
+// Void type contains nothing. It works as a placeholder for type parameter.
+type Void struct{}
+
+// MAFInput synchronizes with `pbv1.ValueType`, excluding `ValueTypeUnknown`
+// and `ValueTypeBinaryData`.
+type MAFInput interface {
+       ~string | ~int64 | ~float64 | ~[]string | ~[]int64 | Void
+}
+
+// MAFKeep represents the only two types of value hold by MAF.
+type MAFKeep interface {
+       ~int64 | ~float64
+}
+
+var errFieldValueType = fmt.Errorf("unsupported input value type on this 
field")
+
+// MAFArgument represents a segment of elements as an argument.
+type MAFArgument[T MAFInput] struct {

Review Comment:
   Maybe this struct is unnecessary, should we remove it?



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