-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add Time with Timezone to at_timezone function #15435
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
base: main
Are you sure you want to change the base?
Add Time with Timezone to at_timezone function #15435
Conversation
✅ Deploy Preview for meta-velox canceled.
|
|
@natashasehgal has exported this pull request. If you are a Meta employee, you can view the originating Diff in D86487936. |
|
Thanks for this change @natashasehgal ! |
|
|
||
| // Similar to timestamp version - only timezone ID changes, not the time | ||
| // value. | ||
| result = pack(inputMs, targetTimezoneID); |
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.
I think you need to call the time equivalent of time with timezone else you will create invalid time types.
| struct AtTimezoneTimeFunction : public TimestampWithTimezoneSupport<T> { | ||
| VELOX_DEFINE_FUNCTION_TYPES(T); | ||
|
|
||
| std::optional<int64_t> targetTimezoneID_; |
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.
This need only be an int16_t type..
| at_timezone_time( | ||
| pack(millisTenOClockWarsawWinter, tz::getTimeZoneID("Europe/Warsaw")), | ||
| "UTC"), | ||
| pack(millisTenOClockWarsawWinter, tz::getTimeZoneID("UTC"))); |
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.
This isnt right, timewithtimezone supports bias encoding of offset minutes, not IANA timezone id's.
Summary: Add Time with Timezone to at_timezone function Found usage within Meta, this is available on Presto not velox -> Scalar function presto.default.at_timezone not registered with arguments: (TIME WITH TIME ZONE, VARCHAR) Differential Revision: D86487936
d15b89e to
1425cf0
Compare
Summary:
Add Time with Timezone to at_timezone function
Found usage within Meta, this is available on Presto not velox ->
Scalar function presto.default.at_timezone not registered with arguments: (TIME WITH TIME ZONE, VARCHAR)
Differential Revision: D86487936