Skip to content

fix: reader float parser#2513

Merged
monkey92t merged 1 commit into
redis:masterfrom
iliyanm:master
Apr 4, 2023
Merged

fix: reader float parser#2513
monkey92t merged 1 commit into
redis:masterfrom
iliyanm:master

Conversation

@iliyanm

@iliyanm iliyanm commented Mar 31, 2023

Copy link
Copy Markdown
Contributor

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

iliyanm commented Apr 3, 2023

Copy link
Copy Markdown
Contributor Author

@monkey92t could you please review

@monkey92t

Copy link
Copy Markdown
Collaborator

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

@iliyanm

iliyanm commented Apr 3, 2023

Copy link
Copy Markdown
Contributor Author

@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