-
Notifications
You must be signed in to change notification settings - Fork 784
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
Review / fix behavior of json schema inference for numbers with trailing decimal point (e.g. 2.
)
#929
Comments
2.
)2.
)
Investigated JSON further and json spec https://www.json.org/json-en.html |
But I think this issue should be about CSV handling of these values and was mistakenly worded to refer to JSON. For CSV there is not a formal spec, so the expected behavior is undefined. My thoughts are that since |
After playing with the solution some more inferring as an Int would mean changing the native parse logic which currently does not support converting "2." to an Int. So I followed the path of least resistance and went ahead with doing a conversion which is already supported and infer "2." as a Float so that the existing native parsing logic can be used. |
I think that makes sense 👍 |
* Inferring 2. as Float64 for issue #929 * Adding pretty print support for fixed size list array * fixing linting errors * adding null row to test
* Inferring 2. as Float64 for issue #929 * Adding pretty print support for fixed size list array * fixing linting errors * adding null row to test
* Inferring 2. as Float64 for issue #929 * Adding pretty print support for fixed size list array * fixing linting errors * adding null row to test
Co-authored-by: Brian Rackle <[email protected]>
* Inferring 2. as Float64 for issue #929 * Adding pretty print support for fixed size list array * fixing linting errors * adding null row to test Co-authored-by: Brian Rackle <[email protected]>
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
This is a follow on to this conversation #831 (comment) on #831 . Specifically, the question is what to do with numbers like
2.
Today the JSON parser schema inference treats numbers like
2.
asUtf8
(aka as strings).As @brianrackle and @jimexist noted, this could be treated as either
Int
or aFloat
and it is not clear exactly what the behavior should beDescribe the solution you'd like
Propose a behavior and implement any code / test changes necessary
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: