hanahmily commented on a change in pull request #14:
URL: https://github.com/apache/skywalking-banyandb/pull/14#discussion_r667595792
##########
File path: api/common/id.go
##########
@@ -18,3 +18,40 @@
package common
type ChunkID uint64
+
+type ChunkIDs []ChunkID
+
+// HashIntersect returns an intersection of two ChunkID arrays
+// without any assumptions on the order. It uses a HashMap to mark
+// the existence of a item.
+func (c ChunkIDs) HashIntersect(other ChunkIDs) ChunkIDs {
+ if c == nil && other == nil {
Review comment:
The receiver `c` should not be nil from what I know. Can we remove this
precondition?
##########
File path: pkg/logical/expr_literal.go
##########
@@ -52,12 +57,20 @@ func (i *int64Literal) String() string {
return strconv.FormatInt(i.int64, 10)
}
-var _ Expr = (*int64ArrLiteral)(nil)
+var _ LiteralExpr = (*int64ArrLiteral)(nil)
type int64ArrLiteral struct {
arr []int64
}
+func (i *int64ArrLiteral) Bytes() [][]byte {
+ var b [][]byte
Review comment:
how about `make` a slice with the capacity as `i.arr`
--
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]