hanahmily commented on a change in pull request #20:
URL: https://github.com/apache/skywalking-banyandb/pull/20#discussion_r672809215



##########
File path: pkg/query/logical/plan_indexscan.go
##########
@@ -107,12 +108,13 @@ type indexScan struct {
 }
 
 func (i *indexScan) Execute(ec executor2.ExecutionContext) ([]data.Entity, 
error) {
-       var chunkSet common.ChunkIDs
+       var chunkSet posting.List
        for _, exprs := range i.conditionMap {
                // TODO: Discuss which metadata should be used!
                // 1) traceSeries Metadata: indirect mapping
                // 2) indexRule Metadata: cannot uniquely determine traceSeries
-               chunks, err := ec.Search(*i.traceMetadata, i.startTime, 
i.endTime, convertToConditions(exprs))
+               // TODO: should pass correct shardID
+               chunks, err := ec.Search(*i.traceMetadata, 0, i.startTime, 
i.endTime, convertToConditions(exprs))

Review comment:
       @lujiajing1126 You should get shards info from the series module, then 
searching results among those shards. 

##########
File path: pkg/query/logical/plan_indexscan.go
##########
@@ -121,11 +123,12 @@ func (i *indexScan) Execute(ec 
executor2.ExecutionContext) ([]data.Entity, error
                        chunkSet = chunks
                } else {
                        // afterwards, it must not be nil
-                       chunkSet = chunkSet.HashIntersect(chunks)
+                       _ = chunkSet.Intersect(chunks)
                }
        }
 
-       return ec.FetchEntity(*i.traceMetadata, chunkSet, series.ScanOptions{
+       //TODO: pass correct shardID
+       return ec.FetchEntity(*i.traceMetadata, 0, chunkSet, series.ScanOptions{

Review comment:
       @lujiajing1126 As mentioned above, once getting the searching results 
from a particular shard, you would fetch entities from that shard's trace 
series. 

##########
File path: pkg/query/logical/plan_indexscan.go
##########
@@ -107,12 +108,13 @@ type indexScan struct {
 }
 
 func (i *indexScan) Execute(ec executor2.ExecutionContext) ([]data.Entity, 
error) {
-       var chunkSet common.ChunkIDs
+       var chunkSet posting.List
        for _, exprs := range i.conditionMap {
                // TODO: Discuss which metadata should be used!

Review comment:
       @lujiajing1126 IndexRule metadata should be selected here




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