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/04/26 12:37:10 UTC

[GitHub] [arrow-rs] alamb opened a new issue #108: Considers scientific notation when inferring schema from csv

alamb opened a new issue #108:
URL: https://github.com/apache/arrow-rs/issues/108


   *Note*: migrated from original JIRA: https://issues.apache.org/jira/browse/ARROW-10132
   
    
   ||col||
   |1.2|
   |1.3e-2|
   |1.4|
   
   Currently this column would be inferred as Utf8 type, since csv::reader::DECIMAL_RE is defined as r"^-?(\d+\.\d+)$". Maybe we could change this to r"^-?(\d+\.\d+)(e-?(\d+))?$" or similar stuff to allow scientific notation of real number inferred as float?
   
    
   
   (The RE I currently proposed doesn't handle "5e-4" correctly though)
   
    
   
   And I would wish we could infer "3." or ".3" as float too. I will come up with an exact RE when I get time.
   
    


-- 
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.

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