Skip to content
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

DM-45386: Fix serialization of datetime64 to parquet via numpy and astropy. #1041

Merged
merged 3 commits into from
Jul 25, 2024

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented Jul 23, 2024

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes
  • (if changing dimensions.yaml) make a copy of dimensions.yaml in configs/old_dimensions

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.37%. Comparing base (0ea5e73) to head (e246ec6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1041   +/-   ##
=======================================
  Coverage   89.37%   89.37%           
=======================================
  Files         359      359           
  Lines       45622    45630    +8     
  Branches     9348     9349    +1     
=======================================
+ Hits        40775    40783    +8     
  Misses       3521     3521           
  Partials     1326     1326           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erykoff erykoff force-pushed the tickets/DM-45386 branch 2 times, most recently from ad78a93 to 6bbd594 Compare July 24, 2024 01:18
Copy link

@BrunoSanchez BrunoSanchez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Just one suggestion:
This bug I found it first using the datetime[us] so adding it to the test cases might be good.

@@ -138,6 +139,7 @@ def _makeSimpleNumpyTable(include_multidim=False, include_bigendian=False):
("f", "i8"),
("strcol", "U10"),
("bytecol", "a10"),
("dt", "datetime64[ns]"),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add to the test the us as well? Is it relevant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will add that!

This conversion has to be done by hand, but once the correct arrow type is
specified the rest of the code handles the datatype and round-trips.
The datetime column does not work correctly with the direct astropy
serialization.
@erykoff erykoff merged commit 88f4f2d into main Jul 25, 2024
18 checks passed
@erykoff erykoff deleted the tickets/DM-45386 branch July 25, 2024 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants