Skip to content

Conversation

@natashasehgal
Copy link
Contributor

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

@netlify
Copy link

netlify bot commented Nov 7, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 1425cf0
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/691272ace9e83c0008304e5e

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 7, 2025
@meta-codesync
Copy link

meta-codesync bot commented Nov 7, 2025

@natashasehgal has exported this pull request. If you are a Meta employee, you can view the originating Diff in D86487936.

@kgpai
Copy link
Contributor

kgpai commented Nov 7, 2025

Thanks for this change @natashasehgal !


// Similar to timestamp version - only timezone ID changes, not the time
// value.
result = pack(inputMs, targetTimezoneID);
Copy link
Contributor

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_;
Copy link
Contributor

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")));
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants