ARROW-12278: [Rust][DataFusion] Use Timestamp(Nanosecond, None) for SQL TIMESTAMP Type#9936
ARROW-12278: [Rust][DataFusion] Use Timestamp(Nanosecond, None) for SQL TIMESTAMP Type#9936alamb wants to merge 2 commits intoapache:masterfrom
Conversation
There was a problem hiding this comment.
This is needed so that CREATE EXTERNAL TABLE is handled correctly
rust/datafusion/src/sql/planner.rs
Outdated
There was a problem hiding this comment.
This is the actual code change in this PR
fae1e02 to
fd6e344
Compare
|
FYI @Dandandan / @seddonm1 / @ovr |
jorgecarleitao
left a comment
There was a problem hiding this comment.
LGTM. Nice catch.
Random though: I think that we would benefit from not writing a test on Context to test the SQL planner. It could be easier to identify which tests are testing what by writing unit tests more specialized to the component that they affect, as they usually declare the API behavior and are easier to find.
There was a problem hiding this comment.
a wild println has appeared :)
fd6e344 to
b6fbc1e
Compare
@jorgecarleitao I think the core of the problem is that the tests in What would you think about refactoring the non |
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
(note that the Time part is chopped off)
Changes
This PR changes the default mapping from SQL type
TIMESTAMP