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

Redis State Store query: numeric operators do not work correctly on large numbers #3334

Merged
merged 4 commits into from Feb 5, 2024
Merged

Conversation

gspadotto
Copy link
Contributor

Description

Applied changes to the formatting of numeric values.

I have no deep knowledge of why all numeric values in the Unit Tests are considered as float, so I changed the unit tests in order to make them pass. (I know this is bad)

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #3332

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

yaron2 and others added 3 commits February 5, 2024 16:18
Signed-off-by: yaron2 <schneider.yaron@live.com>
Signed-off-by: Guido Spadotto <guido.spadotto@profesia.it>
Signed-off-by: Guido Spadotto <guido.spad8@gmail.com>
Signed-off-by: Guido Spadotto <guido.spadotto@profesia.it>
Signed-off-by: Guido Spadotto <guido.spadotto@profesia.it>
@gspadotto gspadotto requested review from a team as code owners February 5, 2024 20:39
@ItalyPaleAle
Copy link
Contributor

I have no deep knowledge of why all numeric values in the Unit Tests are considered as float, so I changed the unit tests in order to make them pass. (I know this is bad)

I think (haven't investigated too much however) that it's because they come from JSON. In order to stay compatible with JS (where all numbers are floats), the JSON parser uses float64 when parsing numbers into any. See the note here: https://pkg.go.dev/encoding/json#Unmarshal

@ItalyPaleAle ItalyPaleAle changed the title Fix 3332 Redis State Store query: numeric operators do not work correctly on large numbers Feb 5, 2024
@ItalyPaleAle ItalyPaleAle added this to the v1.14 milestone Feb 5, 2024
@ItalyPaleAle ItalyPaleAle merged commit 43d905d into dapr:main Feb 5, 2024
87 of 88 checks passed
@gspadotto gspadotto deleted the fix-3332 branch February 6, 2024 14:24
@gspadotto
Copy link
Contributor Author

Hi @ItalyPaleAle, I have no knowledge of the process by which a given PR is associated to a specific milestone,
so do not "roast" me for the following request of mine but...

could this fix be scheduled for v1.13 or - at least - be included in the nightly builds (like this)?

My use cases rely on this fix to be in place so I would really appreciate if I could test it as soon as possible.
I'm aware though that my requests will have to yeld to the official release strategy.

Thanks.

@ItalyPaleAle
Copy link
Contributor

Sadly we are really past the code freeze date for 1.13, which was many weeks ago. We can, and sometimes do, make exceptions for bugs that are critical - in this case, because state store querying is an alpha feature (with no path to ever become stable), I am afraid it may be too late for 1.13.

We can definitely include it in a nightly build. I can pin an updated version of this repo in dapr/dapr so it can start being published.

@ItalyPaleAle
Copy link
Contributor

@gspadotto buona notizia. I spoke with another maintainer, we are ok cherry-picking this into 1.13. It should be included in the next RC :)

@ItalyPaleAle ItalyPaleAle modified the milestones: v1.14, v1.13 Feb 7, 2024
berndverst pushed a commit to berndverst/components-contrib that referenced this pull request Feb 7, 2024
…arge numbers (dapr#3334)

Signed-off-by: Guido Spadotto <guido.spadotto@profesia.it>
Signed-off-by: Guido Spadotto <guido.spad8@gmail.com>
Co-authored-by: Guido Spadotto <guido.spadotto@profesia.it>
berndverst added a commit that referenced this pull request Feb 7, 2024
Signed-off-by: Bernd Verst <github@bernd.dev>
Signed-off-by: Guido Spadotto <guido.spadotto@profesia.it>
Signed-off-by: Guido Spadotto <guido.spad8@gmail.com>
Co-authored-by: Guido Spadotto <guido.spad8@gmail.com>
Co-authored-by: Guido Spadotto <guido.spadotto@profesia.it>
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.

Redis State Store: numeric operators do not work correctly on large numbers due to formatting logic in Go
4 participants