You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/11/08 17:11:10 UTC

[GitHub] [arrow-rs] brackle-lattice commented on a change in pull request #831: Adding ability to parse float from number with leading decimal

brackle-lattice commented on a change in pull request #831:
URL: https://github.com/apache/arrow-rs/pull/831#discussion_r744929541



##########
File path: arrow/src/csv/reader.rs
##########
@@ -1341,6 +1341,7 @@ mod tests {
         assert_eq!(infer_field_schema("\"123\""), DataType::Utf8);
         assert_eq!(infer_field_schema("10"), DataType::Int64);
         assert_eq!(infer_field_schema("10.2"), DataType::Float64);
+        assert_eq!(infer_field_schema(".2"), DataType::Float64);

Review comment:
       Taking a look at the JSON parser in more detail and running some tests to see how the JSON parser deals with a case like '2.'. Reason being is that I think '2.' is a little less clear how to handle because that value can be represented by an Int, so the question is does the presence of a decimal automatically infer Float or should there be some laziness to upgrading from Int to Float and only done when necessary.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org