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



##########
File path: pkg/query/logical/plan_indexscan_global.go
##########
@@ -86,9 +86,10 @@ func (t *globalIndexScan) Execute(ec 
executor.ExecutionContext) ([]*streamv1.Ele
        }
        var elements []*streamv1.Element
        for _, shard := range shards {
-               elementsInShard, err := t.executeForShard(ec, shard)
-               if err != nil {
-                       return elements, err
+               elementsInShard, shardErr := t.executeForShard(ec, shard)
+               if shardErr != nil {
+                       // TODO: shall we proceed?

Review comment:
       this fail-fast strategy is good to me

##########
File path: pkg/query/logical/plan_indexscan_local.go
##########
@@ -173,6 +180,10 @@ func (i *localIndexScan) executeInShard(shard tsdb.Shard) 
([]tsdb.Iterator, erro
                return nil, err
        }
 
+       if seriesList == nil || len(seriesList) == 0 {

Review comment:
       `len()` can handle both empty and nil slices, 




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