Description
Problem
cbimport CSV fails to import a document with when using --infer-types where a field is NaN. This is because NaN is a valid float under the IEEE-754 specification meaning Not a Number.
Steps to reproduce
- Create the following CSV
a,b
100,NAN
- Import the CSV
cbimport csv -c couchbase://localhost -u Administrator -p password -b default -d file:///test.csv --field-separator , -g direct::#MONO_INCR# --omit-empty --infer-types
Expectation
For the import not to fail and for NAN to be treated as a string and not a float.
Attachments
For Gerrit Dashboard: MB-32393 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
102965,4 | MB-32393 Handle NAN as a string and not a float | alice | backup | Status: MERGED | +2 | +1 |
102989,3 | MB-32393 Handle -Inf, +Inf, etc as a string and not a float | alice | backup | Status: MERGED | +2 | +1 |