-
Notifications
You must be signed in to change notification settings - Fork 794
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
Fix incorrect cast Timestamp with Timezone #4201
Conversation
Thank you for this, I'm not sure this logic is correct, however. If both quantities have timezones, no adjustment should be necessary, as they are already normalized to UTC. The complexity arises when converting between timestamps where one doesn't have a timezone. This requires some care, especially to handle timezones that don't have fixed offsets. In the forward direction I think this involves doing something like
And in the reverse direction
Let me know if you get stuck, timezones are wild... |
@tustvold Yes sorry it's not done yet. I have problem compiling in my macbook pro (see Discord). That's why I checked in the code that isn't even compiling yet so I can switch to my Linux machine. |
Thank you for the feedback @tustvold. Very helpful. |
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 is great, really awesome work
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 we just need to move the tests and this is ready to go, returning UTC time when stripping the timezone is what we currently do, and is consistent with the parsing kernels, so 👍 from me
Co-authored-by: Raphael Taylor-Davies <[email protected]>
Co-authored-by: Raphael Taylor-Davies <[email protected]>
Thanks again 👍 |
Thanks for the quick review @tustvold and very helpful feedback along the way. 🍻 |
See related discussion #5827 |
Which issue does this PR close?
Closes apache/datafusion#5952.
Closes #1936
Rationale for this change
N/A
What changes are included in this PR?
N/A
Are there any user-facing changes?
No