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

JSON bugs in the Fakeredis tests #3671

Closed
5 tasks done
BagritsevichStepan opened this issue Sep 8, 2024 · 3 comments · Fixed by #3773
Closed
5 tasks done

JSON bugs in the Fakeredis tests #3671

BagritsevichStepan opened this issue Sep 8, 2024 · 3 comments · Fixed by #3773
Assignees
Labels
bug Something isn't working

Comments

@BagritsevichStepan
Copy link
Contributor

BagritsevichStepan commented Sep 8, 2024

JSON bugs that were found in the Fakeredis tests:

127.0.0.1:6380> JSON.SET arr . '[]'
OK
127.0.0.1:6380> JSON.ARRPOP arr .
(error) WRONGTYPE wrong JSON type of path value // Result is wrong
127.0.0.1:6379> JSON.SET mykey . '{"name": "Alice", "age": 30}'
OK
127.0.0.1:6379> JSON.SET mykey .address '{"name": "Alice", "age": 30}'
(nil) // Result is wrong. Should return OK
127.0.0.1:6379> JSON.SET arr $ '[0,1,2,3,4]'
OK
127.0.0.1:6379> JSON.ARRTRIM arr $ -1 3
1) (integer) 4 // WRONG. Should return 0
127.0.0.1:6379> JSON.GET arr
"[0,1,2,3]" // WRONG. Should return "[]"
127.0.0.1:6379> JSON.SET json $ '[2, 3.0, 3]'
OK
127.0.0.1:6379> JSON.ARRINDEX json $ 3
1) (integer) 1 // WRONG. Should return 2
@romange
Copy link
Collaborator

romange commented Sep 8, 2024

@BagritsevichStepan please do not work on filter expressions for jsonpath v2 - it's too complicated, so lets keep it as a separate (open) task .

@romange
Copy link
Collaborator

romange commented Sep 23, 2024

@BagritsevichStepan should we close this one?

@BagritsevichStepan
Copy link
Contributor Author

@BagritsevichStepan should we close this one?

Not yet, will push today pr that finally closes it.

BagritsevichStepan added a commit to BagritsevichStepan/dragonfly that referenced this issue Sep 23, 2024
fixes dragonflydb#3671

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
BagritsevichStepan added a commit to BagritsevichStepan/dragonfly that referenced this issue Sep 23, 2024
fixes dragonflydb#3671

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
BagritsevichStepan added a commit to BagritsevichStepan/dragonfly that referenced this issue Oct 17, 2024
fixes dragonflydb#3671

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants