-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Feat: Make extract SQL expression timezone aware #18417
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?
Conversation
|
I haven't had a chance to go over this in detail but can we add some tests to the .slt to test where the timestamp is being provided with a timezone? I didn't see any from a quick look. |
…instead of going through date_part()
with the introduction of the tests recommended, it led to making extract independent from date_part --> it does not use the date_part udf. Lmk if you have any concerns.
|
|
I'll try and review this tomorrow though reading that extract was, err, extracted to a new function is a surprise. |
Which issue does this PR close?
Rationale for this change
This PR makes the extract expression timezone aware. The configuration of time zone (example - SET datafusion.execution.time_zone = '+04:00';) is now recognised and the extract statement correspondingly returns the right results through date_part.
What changes are included in this PR?
Are these changes tested?
Yes (slt)
Are there any user-facing changes?
Yes