Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust][DataFusion]Use Timestamp(Nanosecond, None) for SQL TIMESTAMP Type #18599

Closed
asfimport opened this issue Apr 7, 2021 · 1 comment
Closed

Comments

@asfimport
Copy link
Collaborator

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

    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 how it is only a date, not a timestamp)

Reporter: Andrew Lamb / @alamb
Assignee: Andrew Lamb / @alamb

PRs and other links:

Note: This issue was originally created as ARROW-12278. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Andrew Lamb / @alamb:
Issue resolved by pull request 9936
#9936

@asfimport asfimport added this to the 4.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants