[ 
https://issues.apache.org/jira/browse/ARROW-12278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrew Lamb resolved ARROW-12278.
---------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Issue resolved by pull request 9936
[https://github.com/apache/arrow/pull/9936]

> [Rust][DataFusion]Use Timestamp(Nanosecond, None) for SQL TIMESTAMP Type
> ------------------------------------------------------------------------
>
>                 Key: ARROW-12278
>                 URL: https://issues.apache.org/jira/browse/ARROW-12278
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Rust - DataFusion
>            Reporter: Andrew Lamb
>            Assignee: Andrew Lamb
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> # Rationale
> Running the query `CREATE EXTERNAL TABLE .. (c TIMESTAMP)` today in 
> DataFusion will result in a data type pf "Date64" which means that anything 
> more specific than the date will be ignored.
> This leads to strange behavior such as
> {code}
> echo "Jorge,2018-12-13T12:12:10.011" >> /tmp/foo.csv
> echo "Andrew,2018-11-13T17:11:10.011" > /tmp/foo.csv
> cargo run -p datafusion --bin datafusion-cli
>     Finished dev [unoptimized + debuginfo] target(s) in 0.23s
>      Running `target/debug/datafusion-cli`
> > CREATE EXTERNAL TABLE t(a varchar, b TIMESTAMP)
> STORED AS CSV
> LOCATION '/tmp/foo.csv';
> 0 rows in set. Query took 0 seconds.
> > select * from t;
> +--------+------------+
> | a      | b          |
> +--------+------------+
> | Andrew | 2018-11-13 |
> | Jorge  | 2018-12-13 |
> +--------+------------+
> {code}
> (note how it is only a date, not a timestamp)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to