dice icon indicating copy to clipboard operation
dice copied to clipboard

Handle root path '.' correctly in JSON.OBJLEN command

Open JyotinderSingh opened this issue 1 year ago • 8 comments

The current implementation of JSON.OBJLEN does not correctly handle the root path '.'. This needs to be fixed to align with Redis behavior.

Current behavior: When using JSON.OBJLEN doc ., the library is unable to parse it and returns an error.

Expected behavior: JSON.OBJLEN doc . should return the length of the complete parent object, consistent with Redis behavior.

Additional context:

  • This issue was identified in PR #593: https://github.com/DiceDB/dice/pull/593#discussion_r1761191999
  • After implementation, appropriate tests should be added or updated in integration_tests/commands/json_test.go

Tasks:

  • [ ] Implement the fix in evalJSONOBJLEN function
  • [ ] Add or update tests to cover this scenario
  • [ ] Ensure the fix doesn't introduce any regressions

JyotinderSingh avatar Sep 17 '24 19:09 JyotinderSingh

@JyotinderSingh pls assign this to me.

AshikBN avatar Sep 18 '24 01:09 AshikBN

@JyotinderSingh pls assign this to me.

Assigned.

JyotinderSingh avatar Sep 18 '24 03:09 JyotinderSingh

@AshikBN Are you working on this? If not I would like to pick this up

HassanAarzoo avatar Sep 20 '24 10:09 HassanAarzoo

i have not yet, you can start if you are interested @JyotinderSingh Can this be assigned to @HassanAarzoo Please

AshikBN avatar Sep 20 '24 18:09 AshikBN

@JyotinderSingh I am also interested to work on this issue

kapishmalik avatar Sep 21 '24 19:09 kapishmalik

Hello @AshikBN,

There has been no activity on this issue for the past 5 days. It would be awesome if you keep posting updates to this issue so that we know you are actively working on it.

We are really eager to close this issue at the earliest, hence if we continue to see the inactivity, we will have to reassign the issue to someone else. We are doing this to ensure that the project maintains its momentum and others are not blocked on this work.

Just drop a comment with the current status of the work or share any issues you are facing. We can always chip in to help you out.

Thanks again.

arpitbbhayani avatar Oct 03 '24 14:10 arpitbbhayani

Hey @JyotinderSingh, requesting you to assign this to me. Would like to fix this particular case.

iamskp11 avatar Oct 05 '24 15:10 iamskp11

Hey @JyotinderSingh, requesting you to assign this to me. Would like to fix this particular case.

Assigned

JyotinderSingh avatar Oct 05 '24 15:10 JyotinderSingh