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 2022/10/10 12:10:16 UTC
[GitHub] [skywalking] hanahmily opened a new issue, #9759: [BanyanDB] Support "IN" and "NOT IN" binary operation in criteria
hanahmily opened a new issue, #9759:
URL: https://github.com/apache/skywalking/issues/9759
### Search before asking
- [X] I had searched in the [issues](https://github.com/apache/skywalking/issues?q=is%3Aissue) and found no similar feature requirement.
### Description
The query module should implement "IN" and "NOT IN" defined by APIs.
BTW, the OAP server doesn't need this operation for now.
### Use case
_No response_
### Related issues
_No response_
### Are you willing to submit a PR?
- [ ] Yes I am willing to submit a PR!
### 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: notifications-unsubscribe@skywalking.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [skywalking] hanahmily closed issue #9759: [BanyanDB] Support "IN" and "NOT IN" binary operation in criteria
Posted by GitBox <gi...@apache.org>.
hanahmily closed issue #9759: [BanyanDB] Support "IN" and "NOT IN" binary operation in criteria
URL: https://github.com/apache/skywalking/issues/9759
--
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] DevPJ9 commented on issue #9759: [BanyanDB] Support "IN" and "NOT IN" binary operation in criteria
Posted by GitBox <gi...@apache.org>.
DevPJ9 commented on issue #9759:
URL: https://github.com/apache/skywalking/issues/9759#issuecomment-1278944409
Thanks, @hanahmily. I will start with the changes and will let you know If I get stuck. :)
--
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] DevPJ9 commented on issue #9759: [BanyanDB] Support "IN" and "NOT IN" binary operation in criteria
Posted by GitBox <gi...@apache.org>.
DevPJ9 commented on issue #9759:
URL: https://github.com/apache/skywalking/issues/9759#issuecomment-1279181511
Hello @hanahmily I have raised a PR #9759. Can you please review and about the tag_filter changes, I am sorry but I don't know how to proceed further.
--
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] hanahmily commented on issue #9759: [BanyanDB] Support "IN" and "NOT IN" binary operation in criteria
Posted by GitBox <gi...@apache.org>.
hanahmily commented on issue #9759:
URL: https://github.com/apache/skywalking/issues/9759#issuecomment-1356807478
Fixed by https://github.com/apache/skywalking-banyandb/pull/191
--
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] DevPJ9 commented on issue #9759: [BanyanDB] Support "IN" and "NOT IN" binary operation in criteria
Posted by GitBox <gi...@apache.org>.
DevPJ9 commented on issue #9759:
URL: https://github.com/apache/skywalking/issues/9759#issuecomment-1278520587
Hello, @hanahmily I would like to contribute. Can you please provide some more info on the task?
--
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] hanahmily commented on issue #9759: [BanyanDB] Support "IN" and "NOT IN" binary operation in criteria
Posted by GitBox <gi...@apache.org>.
hanahmily commented on issue #9759:
URL: https://github.com/apache/skywalking/issues/9759#issuecomment-1278813379
@DevPJ9 You could split this task into several parts:
## Add operations to API specification
Add `IN` and `NOT_IN` at https://github.com/apache/skywalking-banyandb/blob/main/api/proto/banyandb/model/v1/query.proto#L54
## Parse added operations in index_filter
If the tag referred to by the binary expression is indexed, the index_filter will handle it.
Parse them at https://github.com/apache/skywalking-banyandb/blob/main/pkg/query/logical/index_filter.go#L102. You might notice that `HAVING` uses `and` nodes to construct the filter. Correspondingly, `IN` could leverage `or` node like
```go
case model_v1.Condition_BINARY_OP_OR:
bb := expr.Bytes()
and := newOr(len(bb))
for _, b := range bb {
and.append(newEq(indexRule, newBytesLiteral(b)))
}
return and, []tsdb.Entity{entity}, nil
```
## Parse operations in tag_filter
We also need to parse them at https://github.com/apache/skywalking-banyandb/blob/main/pkg/query/logical/tag_filter.go#L86. You should create a new `orTag` struct with `Match` like
```
func (h *orTag) Match(tagFamilies []*model_v1.TagFamily) (bool, error) {
expr, err := tagExpr(tagFamilies, h.Name)
if err != nil {
return false, err
}
return expr.BelongTo(h.Expr), nil
}
## Add test cases
Add integration test cases to https://github.com/apache/skywalking-banyandb/blob/main/test/cases/measure/measure.go and https://github.com/apache/skywalking-banyandb/blob/main/test/cases/stream/stream.go to verify the behaviors.
```
--
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] DevPJ9 commented on issue #9759: [BanyanDB] Support "IN" and "NOT IN" binary operation in criteria
Posted by GitBox <gi...@apache.org>.
DevPJ9 commented on issue #9759:
URL: https://github.com/apache/skywalking/issues/9759#issuecomment-1279141531
Hello @hanahmily I have understood the requirement and I will do the changes and raise a PR, However, I have not worked with "go" language so I might do the changes wrong. Kindly guide me through those mistakes.
--
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