-
Notifications
You must be signed in to change notification settings - Fork 90
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: Drop timezone in from_arrow #3392
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files
|
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 agree about dropping timezones and being explicit about it in the documentation (though this PR doesn't change any documentation). I assume that you're using
getattr(storage_type, "tz", None) is None
rather than
hasattr(storage_type, "tz")
because the tz
attribute might or might not exist and might or might not be None
. Even if that's not the case now, it sounds like a good way to defensively future-proof it.
Right. Only time types can have the attribute at all, but it can be None or a string. I'll add doc changes and a test to show it works. Question: I needed to change two locations to make my spark workflow happy. What is the difference between how these are reached - is it buffer versus schema conversion or something else? |
First, only It doesn't make sense to merge them in a way that does two recursive descents through the tree: when you want to convert data, you don't need to do anything with Forms, so it doesn't buy you anything to do |
"yes" :) I added the doc and test. The test just makes sure there is no error. Either of the from_ would have failed without the change in conversions.py . |
All green |
Awkward does not support timezones in timestamp types, because that's how things are in numpy.
There is not an easy way to remove arrow timezones, so I am proposing that we simply drop them, and document this well in the from_arrow text.
This came in the context of akimbo.spark, since spark always localises times. This PR essentially undoes this action. I am open to other solutions.