Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object/search: Support numeric queries #2733

Merged
merged 2 commits into from
Feb 29, 2024

Conversation

cthulhu-rider
Copy link
Contributor

@cthulhu-rider cthulhu-rider commented Jan 30, 2024

WIP:

  • prelim unit tests
  • support in metabase
  • support in CLI

all ready, waiting for SDK merge

@cthulhu-rider cthulhu-rider force-pushed the feature/2730-object-search-num-match branch 2 times, most recently from 260be1c to 2e5ced2 Compare January 31, 2024 16:21
for i := range prm.filters {
switch prm.filters[i].Operation() {
case object.MatchNumGT, object.MatchNumGE, object.MatchNumLT, object.MatchNumLE:
// TODO: big math takes less code but inefficient
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optimization, suggest to defer in separate issue

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

Attention: Patch coverage is 65.45455% with 38 lines in your changes are missing coverage. Please review.

Project coverage is 28.99%. Comparing base (3b0bc18) to head (b0e4662).

Files Patch % Lines
pkg/local_object_storage/metabase/select.go 72.63% 17 Missing and 9 partials ⚠️
pkg/services/object/search/search.go 25.00% 7 Missing and 2 partials ⚠️
pkg/local_object_storage/engine/select.go 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2733      +/-   ##
==========================================
+ Coverage   28.86%   28.99%   +0.12%     
==========================================
  Files         415      415              
  Lines       32485    32588     +103     
==========================================
+ Hits         9376     9448      +72     
- Misses      22265    22288      +23     
- Partials      844      852       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cthulhu-rider cthulhu-rider force-pushed the feature/2730-object-search-num-match branch 2 times, most recently from dfea573 to 042c632 Compare January 31, 2024 16:33
@cthulhu-rider cthulhu-rider force-pushed the feature/2730-object-search-num-match branch 3 times, most recently from 6d2a6bd to c5a8f40 Compare February 22, 2024 06:20
@cthulhu-rider cthulhu-rider marked this pull request as ready for review February 22, 2024 06:24
@cthulhu-rider cthulhu-rider force-pushed the feature/2730-object-search-num-match branch from c5a8f40 to c786251 Compare February 26, 2024 11:17
pkg/local_object_storage/metabase/select.go Outdated Show resolved Hide resolved
pkg/local_object_storage/metabase/select.go Outdated Show resolved Hide resolved
pkg/local_object_storage/metabase/select.go Outdated Show resolved Hide resolved
pkg/local_object_storage/metabase/select.go Show resolved Hide resolved
@carpawell carpawell mentioned this pull request Feb 27, 2024
3 tasks
@cthulhu-rider cthulhu-rider force-pushed the feature/2730-object-search-num-match branch 2 times, most recently from 3f675e2 to 95079ba Compare February 28, 2024 04:15
pkg/local_object_storage/metabase/select.go Outdated Show resolved Hide resolved
pkg/local_object_storage/metabase/select.go Outdated Show resolved Hide resolved
pkg/local_object_storage/metabase/select.go Outdated Show resolved Hide resolved
pkg/services/object/search/search.go Show resolved Hide resolved
@cthulhu-rider cthulhu-rider force-pushed the feature/2730-object-search-num-match branch from 95079ba to 68d0a41 Compare February 28, 2024 09:12
Recently, NeoFS object search protocol was extended with `<`, `<=`, `>`
and `>=` numeric operators. These operators provide client comparison
operations of decimal integers.

`ObjectService.Search` server now supports numeric filters and handles
them properly.

Refs #2730.

Signed-off-by: Leonard Lyubich <[email protected]>
Recently, NeoFS object search protocol was extended with `<`, `<=`, `>`
and `>=` numeric operators. These operators provide client comparison
operations of decimal integers.

From now users can use `GT`, `GE`, `LT` and `LE` binary operators to
form their numeric object queries for payload size, creation epoch or
any other user-defined object attribute.

Refs #2730.

Signed-off-by: Leonard Lyubich <[email protected]>
@cthulhu-rider cthulhu-rider force-pushed the feature/2730-object-search-num-match branch from 68d0a41 to b0e4662 Compare February 28, 2024 09:15
@cthulhu-rider cthulhu-rider merged commit 28b122a into master Feb 29, 2024
15 of 16 checks passed
@cthulhu-rider cthulhu-rider deleted the feature/2730-object-search-num-match branch February 29, 2024 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants