Skip to content

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.

2 participants