-
Notifications
You must be signed in to change notification settings - Fork 783
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
Support UTF8 cast to Timestamp with timezone #3673
Conversation
# Conflicts: # arrow-cast/src/cast.rs
arrow-cast/src/cast.rs
Outdated
let array = Arc::new(valid) as ArrayRef; | ||
let b = cast( | ||
&array, | ||
&DataType::Timestamp(TimeUnit::Nanosecond, Some("+00:00".to_string())), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
it'd be great if we could add some test cases for casting to non-utc time zone
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
| Timestamp(TimeUnit::Nanosecond, _) | ||
) => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you have *tz == Some("+00:00".to_owned())
as condition, it seems also necessary to put it here. Otherwise there will be casting error because can_cast_types
reports it is supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@tustvold @viirya @waitingkuo please take a look until the code rots |
Benchmark runs are scheduled for baseline = bb4fc59 and contender = 07e2063. 07e2063 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
Which issue does this PR close?
Closes #3664.
Rationale for this change
Support UTF8 cast to TimestampTZ in formats like PG https://www.postgresql.org/docs/current/datatype-datetime.html#DATATYPE-DATETIME-TIME-TABLE
What changes are included in this PR?
Are there any user-facing changes?
No