liukun4515 commented on issue #926:
URL: https://github.com/apache/arrow-rs/issues/926#issuecomment-966208845


   > thanks for the issue @liukun4515 however i don't think this is doable as 
is.
   > 
   > by default numbers are read into f64 but not decimal because for decimal 
you'll need to have a precision configured. that can't be inferred from the csv 
data itself. if you do need to do that either read as f64 and convert yourself 
(using cast) or pre-convert the data as parquet so that arrow can be correctly 
mapped.
   
   The precision is a problem, i found the issue from the datafusion when i use 
this sql to create a table.
   
   `CREATE EXTERNAL TABLE food (a DECIMAL(10,0), b INT) STORED AS CSV LOCATION 
'data.csv';`
   
   I can read data from the csv file, so i want to implement the feature to 
support decimal data from csv file.
   
   I think  if user provide the schema with decimal data type, we should read 
csv file data and convert them to decimal type.


-- 
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-unsubscr...@arrow.apache.org

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


Reply via email to