Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARROW-12278: [Rust][DataFusion] Use Timestamp(Nanosecond, None) for S…
…QL TIMESTAMP Type # 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 ```shell 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 | +--------+------------+ ``` (note that the Time part is chopped off) # Changes This PR changes the default mapping from SQL type `TIMESTAMP` Closes apache#9936 from alamb/ARROW-12278-timestamps-for-timestamps Authored-by: Andrew Lamb <[email protected]> Signed-off-by: Andrew Lamb <[email protected]>
- Loading branch information