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

implement json.numincrby #240

Closed
romange opened this issue Aug 13, 2022 · 3 comments
Closed

implement json.numincrby #240

romange opened this issue Aug 13, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@romange
Copy link
Collaborator

romange commented Aug 13, 2022

implement json.numincrby
spec: https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/json-numincrby.html

specifically:

json.set foo $ '{ "e": 1.5 , "a": 1 }' 
json.NUMINCRBY foo $.a 1.1

returns "[2.1]"

and json.NUMINCRBY foo $.e 1 returns "[2.5]"
and json.NUMINCRBY foo $.e 1e10 returns "[1e+10]"

moreover,
json.NUMINCRBY foo $.e inf returns (error) OVERFLOW Addition would overflow

@romange romange added the enhancement New feature or request label Aug 13, 2022
@romange
Copy link
Collaborator Author

romange commented Aug 13, 2022

json.set foo $ '{ "e": 1.5 , "a": 1 }' 
json.NUMINCRBY foo $.e 1.7e308

returns "[1.7e+308]"
but then if we call json.NUMINCRBY foo $.e 1.7e308 again we get
(error) OVERFLOW Addition would overflow because max double is ~ 1.8e308

@romange romange added this to the Post-Release milestone Aug 22, 2022
iko1 added a commit to iko1/dragonfly that referenced this issue Aug 23, 2022
iko1 added a commit to iko1/dragonfly that referenced this issue Aug 26, 2022
iko1 added a commit to iko1/dragonfly that referenced this issue Aug 26, 2022
romange pushed a commit that referenced this issue Aug 26, 2022
* feat(server): implement json.numincrby (#240)

Signed-off-by: iko1 <[email protected]>
romange pushed a commit that referenced this issue Aug 26, 2022
* feat(server): implement json.numincrby (#240)

Signed-off-by: iko1 <[email protected]>
romange pushed a commit that referenced this issue Aug 26, 2022
* feat(server): implement json.numincrby (#240)

Signed-off-by: iko1 <[email protected]>
@iko1
Copy link
Contributor

iko1 commented Sep 21, 2022

This issue can be closed

@romange
Copy link
Collaborator Author

romange commented Sep 21, 2022

🚀

@romange romange closed this as completed Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants