wankai123 opened a new issue, #13535:
URL: https://github.com/apache/skywalking/issues/13535

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Apache SkyWalking Component
   
   BanyanDB (apache/skywalking-banyandb)
   
   ### What happened
   
   When I use `in` for querying, it returns a non-empty result even if the 
candidate set is empty.
   For example, if segmentIdList is empty, the result should have no elements
   ```
           TraceQueryResponse resp = queryTraceDebuggable(isColdStage, 
SegmentRecord.INDEX_NAME, getTimestampRange(duration),
               new QueryBuilder<TraceQuery>() {
                   @Override
                   public void apply(TraceQuery query) {
                       query.and(in(SegmentRecord.SEGMENT_ID, segmentIdList));
                       query.setLimit(segmentQueryMaxSize);
                       query.setOrderBy(new 
TraceQuery.OrderBy(SegmentRecord.START_TIME, AbstractQuery.Sort.DESC));
                   }
               });
   ```
   
   ### What you expected to happen
   
    If segmentIdList is empty, the result should have no elements
   
   ### How to reproduce
   
   Please refer to the above 
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request to fix on your own?
   
   - [ ] Yes I am willing to submit a pull request on my own!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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