Copilot commented on code in PR #917:
URL: 
https://github.com/apache/skywalking-banyandb/pull/917#discussion_r2649054245


##########
banyand/measure/query.go:
##########
@@ -75,8 +75,6 @@ func (m *measure) Query(ctx context.Context, mqo 
model.MeasureQueryOptions) (mqr
        if mqo.TimeRange == nil {
                return nil, errors.New("invalid query options: timeRange are 
required")
        }
-       mqo.TagProjection = m.filterTagProjection(mqo.TagProjection)
-       mqo.FieldProjection = m.filterFieldProjection(mqo.FieldProjection)
        if len(mqo.TagProjection) == 0 && len(mqo.FieldProjection) == 0 {
                return nil, errors.New("invalid query options: tagProjection or 
fieldProjection is required")
        }

Review Comment:
   After removing the filterTagProjection and filterFieldProjection calls, this 
validation now occurs immediately after the timeRange check. However, if all 
requested tags/fields are invalid and get filtered out later in the 
searchSeriesList function (lines 211-242), this check may pass initially but 
result in an empty projection downstream. Consider whether this validation 
should happen after the filtering logic in searchSeriesList to ensure the error 
message accurately reflects which specific tags or fields are invalid.



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