netmap: Add LIKE operation for filter #231

Merged
fyrchik merged 3 commits from acid-ant/frostfs-sdk-go:feature/policy-like into master 2024-09-04 19:51:16 +00:00
Member

Signed-off-by: Anton Nikiforov an.nikiforov@yadro.com

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
acid-ant changed title from netmap: Add LIKE operation for filter to WIP: netmap: Add LIKE operation for filter 2024-06-24 12:08:41 +00:00
acid-ant changed title from WIP: netmap: Add LIKE operation for filter to netmap: Add LIKE operation for filter 2024-06-24 12:12:35 +00:00
acid-ant requested review from storage-core-committers 2024-06-24 12:12:43 +00:00
acid-ant requested review from storage-core-developers 2024-06-24 12:12:44 +00:00
acid-ant force-pushed feature/policy-like from 604bddb803 to 5b729e10d5 2024-06-24 13:09:21 +00:00 Compare
fyrchik requested changes 2024-06-24 13:45:19 +00:00
netmap/filter.go Outdated
@ -111,2 +112,4 @@
case netmap.EQ:
return b.Attribute(f.GetKey()) == f.GetValue()
case netmap.LIKE:
if f.GetValue() == netmap.LikeWildcard {
Owner

The code below seems to work for this case, why have a separate branch in code?

The code below seems to work for this case, why have a separate branch in code?
Author
Member

Just to exit faster in this case. Removed.

Just to exit faster in this case. Removed.
@ -253,0 +294,4 @@
n, err := nm.ContainerNodes(pNamed, []byte{1})
require.NoError(t, err)
require.Equal(t, 1, len(n[0]))
Owner

Could you also add attributes check for all tests?

Could you also add attributes check for all tests?
Author
Member

Added.

Added.
@ -253,0 +318,4 @@
n, err := nm.ContainerNodes(pNamed, []byte{1})
require.NoError(t, err)
require.Equal(t, 3, len(n[0]))
Owner

This does not differ from the previous test. Is there any reason we have 3 "Russia" in the test data?

This does not differ from the previous test. Is there any reason we have 3 "Russia" in the test data?
Author
Member

No reason. Like this number. Updated a bit.

No reason. Like this number. Updated a bit.
acid-ant force-pushed feature/policy-like from 5b729e10d5 to 50b2f45960 2024-06-27 07:48:16 +00:00 Compare
acid-ant requested review from fyrchik 2024-06-27 07:50:25 +00:00
dstepanov-yadro reviewed 2024-06-27 09:23:35 +00:00
go.mod Outdated
@ -3,1 +3,3 @@
go 1.20
go 1.21
replace git.frostfs.info/TrueCloudLab/frostfs-api-go/v2 v2.16.1-0.20240530152826-2f6d3209e1d3 => git.frostfs.info/acid-ant/frostfs-api-go/v2 v2.15.1-0.20240624130238-eed7162e683b

Debugee

Debugee
achuprov reviewed 2024-07-01 07:26:42 +00:00
Dockerfile Outdated
@ -1,4 +1,4 @@
FROM golang:1.21
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install make openjdk-11-jre -y
Member

Why do we need OpenJDK here?

Why do we need OpenJDK here?
Author
Member

To have ability for running antlr in docker.

To have ability for running `antlr` in `docker`.
achuprov marked this conversation as resolved
achuprov reviewed 2024-07-01 07:26:46 +00:00
Dockerfile Outdated
@ -1,4 +1,4 @@
FROM golang:1.21
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install make openjdk-11-jre -y
Member

Why do we need OpenJDK here?

Why do we need OpenJDK here?
Author
Member

To have ability for running antlr in docker.

To have ability for running `antlr` in `docker`.
achuprov marked this conversation as resolved
acid-ant force-pushed feature/policy-like from 50b2f45960 to e6a10fc92d 2024-08-07 13:59:34 +00:00 Compare
acid-ant force-pushed feature/policy-like from e6a10fc92d to 361699ac58 2024-08-09 07:13:05 +00:00 Compare
fyrchik approved these changes 2024-08-09 10:17:48 +00:00
acid-ant force-pushed feature/policy-like from 361699ac58 to 2077b35736 2024-08-12 06:50:27 +00:00 Compare
Author
Member

Rebased on master.

Rebased on master.
fyrchik approved these changes 2024-08-12 06:54:35 +00:00
fyrchik merged commit 2077b35736 into master 2024-08-12 06:54:42 +00:00
Sign in to join this conversation.
No reviewers
TrueCloudLab/storage-core-developers
No milestone
No project
No assignees
4 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: TrueCloudLab/frostfs-sdk-go#231
No description provided.