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

fix: reader float parser #2513

Merged
merged 1 commit into from
Apr 4, 2023
Merged

fix: reader float parser #2513

merged 1 commit into from
Apr 4, 2023

Conversation

iliyanm
Copy link
Contributor

@iliyanm iliyanm commented Mar 31, 2023

Description

Changed the reader float parser to support nan values.
Based on the redis documentation possible float values should be:

",inf\r\n"
",-inf\r\n"
",nan\r\n"

Example

When I execute FT.INFO *index name* parameter records_per_doc_avg can be -nan and the float parser returns:

strconv.ParseFloat: parsing "-nan": invalid syntax

@iliyanm iliyanm force-pushed the master branch 2 times, most recently from 4ae0d45 to 5277926 Compare April 3, 2023 09:17
@iliyanm
Copy link
Contributor Author

iliyanm commented Apr 3, 2023

@monkey92t could you please review

@monkey92t
Copy link
Collaborator

I don't understand why use *float64? Maybe math.Nan()?

@iliyanm
Copy link
Contributor Author

iliyanm commented Apr 3, 2023

@monkey92t you are right. I changed it, please review again.

@monkey92t monkey92t merged commit 46f2450 into redis:master Apr 4, 2023
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.

None yet

2 participants