You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/07/04 10:54:57 UTC

[GitHub] [skywalking-banyandb] lujiajing1126 opened a new pull request #14: Query Module: Executor

lujiajing1126 opened a new pull request #14:
URL: https://github.com/apache/skywalking-banyandb/pull/14


   This PR adds Executor for logical plan.
   
   ## To be discussed
   
   ### The API of `index.Repo`
   
   ```go
   type Repo interface {
           // 1) which Metadata should be used here, since metadata of IndexRule cannot be used to uniquely determine the traceSeries
           // So for now, I use metadata of `TraceSeries`
           // 2) Condition
   	Search(index common.Metadata, startTime, endTime uint64, conditions []Condition) ([]common.ChunkID, error)
   }
   ```


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-banyandb] hanahmily commented on a change in pull request #14: Query Module: Executor

Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-banyandb] hanahmily merged pull request #14: Query Module: Executor

Posted by GitBox <gi...@apache.org>.
hanahmily merged pull request #14:
URL: https://github.com/apache/skywalking-banyandb/pull/14


   


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-banyandb] lujiajing1126 commented on a change in pull request #14: Query Module: Executor

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on a change in pull request #14:
URL: https://github.com/apache/skywalking-banyandb/pull/14#discussion_r667639854



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

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-banyandb] hanahmily commented on pull request #14: Query Module: Executor

Posted by GitBox <gi...@apache.org>.
hanahmily commented on pull request #14:
URL: https://github.com/apache/skywalking-banyandb/pull/14#issuecomment-873597894


   Cool! I will review the details soon.
   
   > We need to add a dataset for testing and performance benchmark in the near future.
   
   After integrating with skywalking OAP, we can record the online/real dataset which is the best choice for the testing purpose. 
   


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-banyandb] lujiajing1126 commented on pull request #14: Query Module: Executor

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on pull request #14:
URL: https://github.com/apache/skywalking-banyandb/pull/14#issuecomment-877990621


   > How about move `pkg/logical` and `pkg/execution` to `pkg/query/logical` and `pkg/query/execution` since they should be classified to `query` module.
   
   Moved to `pkg/query/{logical,executor}`


-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [skywalking-banyandb] lujiajing1126 commented on a change in pull request #14: Query Module: Executor

Posted by GitBox <gi...@apache.org>.
lujiajing1126 commented on a change in pull request #14:
URL: https://github.com/apache/skywalking-banyandb/pull/14#discussion_r667640617



##########
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:
       I've created a slice with capacity, for both `int64ArrLiteral` and `strArrLiteral`.
   
   Later, we may add a general byte buffer module to optimize memory allocation.




-- 
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: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org