Skip to content

Commit

Permalink
fix: set appropriate error message for decimal types in arrow (#1871)
Browse files Browse the repository at this point in the history
* fix: set appropriate error message for decimal types in arrow

* Specific type names for users to look up.

Co-authored-by: Jim Pivarski <jpivarski@users.noreply.github.com>
  • Loading branch information
agoose77 and jpivarski authored Nov 9, 2022
1 parent 21c81e1 commit 17e674a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/awkward/_connect/pyarrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ def popbuffers(paarray, awkwardarrow_type, storage_type, buffers, generate_bitma
# NumPy doesn't support decimal: https://github.com/numpy/numpy/issues/9789
raise ak._errors.wrap_error(
ValueError(
"Arrow arrays containing pickled Python objects can't be converted into Awkward Arrays"
"Arrow arrays containing pyarrow.decimal128 or pyarrow.decimal256 types can't be converted into Awkward Arrays"
)
)

Expand Down Expand Up @@ -746,7 +746,7 @@ def form_popbuffers(awkwardarrow_type, storage_type):
# NumPy doesn't support decimal: https://github.com/numpy/numpy/issues/9789
raise ak._errors.wrap_error(
ValueError(
"Arrow arrays containing pickled Python objects can't be converted into Awkward Arrays"
"Arrow arrays containing pyarrow.decimal128 or pyarrow.decimal256 types can't be converted into Awkward Arrays"
)
)

Expand Down

0 comments on commit 17e674a

Please sign in to comment.