Skip to content

[REVIEW] Upgrade arrow & pyarrow to 5.0.0 - #8908

Merged
rapids-bot[bot] merged 9 commits into
NVIDIA:branch-21.10from
galipremsagar:arrow_5.0
Aug 13, 2021
Merged

rapids-bot[bot] merged 9 commits into
NVIDIA:branch-21.10from
galipremsagar:arrow_5.0

Conversation

@galipremsagar

@galipremsagar galipremsagar commented Jul 30, 2021

Copy link
Copy Markdown
Contributor

This PR upgrades arrow to 5.0.0.

  • Upgrade & test arrow 5.0.0.
  • Fix pytest failures related to decimal arrays.

@galipremsagar galipremsagar added 2 - In Progress Currently a work in progress Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jul 30, 2021
@galipremsagar galipremsagar self-assigned this Jul 30, 2021
@galipremsagar
galipremsagar requested review from a team as code owners July 30, 2021 02:24
@github-actions github-actions Bot added CMake CMake build issue conda libcudf Affects libcudf (C++/CUDA) code. and removed Python Affects Python cuDF API. labels Jul 30, 2021
@github-actions github-actions Bot added the Python Affects Python cuDF API. label Jul 30, 2021
@galipremsagar galipremsagar changed the title [WIP] Upgrade arrow & pyarrow to 5.0.0 [REVIEW] Upgrade arrow & pyarrow to 5.0.0 Jul 30, 2021
@galipremsagar galipremsagar added 4 - Needs cuDF (Python) Reviewer 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Jul 30, 2021
@codecov

codecov Bot commented Jul 30, 2021

Copy link
Copy Markdown

Codecov Report

❗ No coverage uploaded for pull request base (branch-21.10@59b84f3). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff               @@
##             branch-21.10    #8908   +/-   ##
===============================================
  Coverage                ?   10.58%           
===============================================
  Files                   ?      116           
  Lines                   ?    19060           
  Branches                ?        0           
===============================================
  Hits                    ?     2018           
  Misses                  ?    17042           
  Partials                ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59b84f3...e493f4f. Read the comment docs.

@robertmaynard robertmaynard left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CMake changes LGTM

@galipremsagar
galipremsagar requested a review from trxcllnt July 30, 2021 14:48

@brandon-b-miller brandon-b-miller left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes in the column constructor lgtm but I am not quite following why all these tests were wrong. Can you help me with a simple example?

Comment thread python/cudf/cudf/core/column/column.py Outdated
@rjzamora

Copy link
Copy Markdown
Contributor

I'm a bit surprised that CI passes for dask-cudf (I would expect that we need #8871 to avoid the ParquetDataset deprecations in pyarrow-5, but we could be narrowly avoiding the problem for now). Also, note that Dask is temporarily pinned to pyarrow<5

@galipremsagar

Copy link
Copy Markdown
Contributor Author

The changes in the column constructor lgtm but I am not quite following why all these tests were wrong. Can you help me with a simple example?

Sure, previously arrow had a bug of incorrectly allowing value with a lower precision, in 5.0, this is fixed:

>>> pa.array([10, 20], type=pa.decimal128(precision=2, scale=2))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyarrow/array.pxi", line 306, in pyarrow.lib.array
  File "pyarrow/array.pxi", line 39, in pyarrow.lib._sequence_to_array
  File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
  File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Decimal type with precision 2 does not fit into precision inferred from first array element: 2

If we see here, we cannot fit 10 & 20 into a decimal of precision 2 & scale 2.

@galipremsagar
galipremsagar requested a review from a team as a code owner July 30, 2021 15:40
@galipremsagar
galipremsagar requested a review from isVoid July 30, 2021 15:40
@galipremsagar

Copy link
Copy Markdown
Contributor Author

I'm a bit surprised that CI passes for dask-cudf (I would expect that we need #8871 to avoid the ParquetDataset deprecations in pyarrow-5, but we could be narrowly avoiding the problem for now). Also, note that Dask is temporarily pinned to pyarrow<5

I can confirm I didn't see dask-cudf failures locally aswell. Probably because they are just DeprecationWarnings now and not errors?

@brandon-b-miller

Copy link
Copy Markdown
Contributor

The changes in the column constructor lgtm but I am not quite following why all these tests were wrong. Can you help me with a simple example?

Sure, previously arrow had a bug of incorrectly allowing value with a lower precision, in 5.0, this is fixed:

>>> pa.array([10, 20], type=pa.decimal128(precision=2, scale=2))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pyarrow/array.pxi", line 306, in pyarrow.lib.array
  File "pyarrow/array.pxi", line 39, in pyarrow.lib._sequence_to_array
  File "pyarrow/error.pxi", line 143, in pyarrow.lib.pyarrow_internal_check_status
  File "pyarrow/error.pxi", line 99, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Decimal type with precision 2 does not fit into precision inferred from first array element: 2

If we see here, we cannot fit 10 & 20 into a decimal of precision 2 & scale 2.

Oh I see. And thus the result precision must be updated as well.

Thank you for clarifying!

@galipremsagar galipremsagar added the DO NOT MERGE Hold off on merging; see PR for details label Jul 30, 2021
@galipremsagar

Copy link
Copy Markdown
Contributor Author

rerun tests

@galipremsagar galipremsagar removed the DO NOT MERGE Hold off on merging; see PR for details label Jul 30, 2021
@galipremsagar

Copy link
Copy Markdown
Contributor Author

rerun tests

@galipremsagar galipremsagar added the DO NOT MERGE Hold off on merging; see PR for details label Jul 30, 2021
@galipremsagar galipremsagar removed the DO NOT MERGE Hold off on merging; see PR for details label Aug 3, 2021
@github-actions github-actions Bot removed the gpuCI label Aug 3, 2021
@galipremsagar

Copy link
Copy Markdown
Contributor Author

rerun tests

2 similar comments
@galipremsagar

Copy link
Copy Markdown
Contributor Author

rerun tests

@galipremsagar

Copy link
Copy Markdown
Contributor Author

rerun tests

@msadang msadang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me.

@galipremsagar galipremsagar added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Aug 13, 2021
@galipremsagar

Copy link
Copy Markdown
Contributor Author

@gpucibot merge

@rapids-bot
rapids-bot Bot merged commit 2c5a2ad into NVIDIA:branch-21.10 Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5 - Ready to Merge Testing and reviews complete, ready to merge CMake CMake build issue improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants