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-37913: Check for big-endian arrays when serializing to Parquet. #782

Merged
merged 2 commits into from Feb 8, 2023

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented Feb 8, 2023

Checklist

  • ran Jenkins
  • added a release note for user-visible changes to doc/changes

@codecov
Copy link

codecov bot commented Feb 8, 2023

Codecov Report

Base: 85.56% // Head: 85.56% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (29f1e08) compared to base (425db7d).
Patch coverage: 94.28% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #782   +/-   ##
=======================================
  Coverage   85.56%   85.56%           
=======================================
  Files         269      269           
  Lines       35293    35320   +27     
  Branches     7402     7408    +6     
=======================================
+ Hits        30197    30222   +25     
- Misses       3778     3779    +1     
- Partials     1318     1319    +1     
Impacted Files Coverage Δ
python/lsst/daf/butler/formatters/parquet.py 92.03% <75.00%> (-0.37%) ⬇️
tests/test_parquet.py 98.74% <100.00%> (+0.03%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.


try:
arrow_arrays.append(pa.array(val, type=schema.field(name).type))
except pa.ArrowNotImplementedError:
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks like it will send all ArrowNotImplementedError exceptions down to try byte swap - is that what you want here? Or would some conditional checking work well, e.g.:

except pa.ArrowNotImplementedError as err:
    if "Byte-swapped arrays not supported" not in str(e):
        # try byte swapping
    else:
        # raise

@erykoff erykoff merged commit 72915de into main Feb 8, 2023
@erykoff erykoff deleted the tickets/DM-37913 branch February 8, 2023 22:56
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.

None yet

2 participants