Skip to content

Accept const refs instead of const unique_ptr refs in reduce and scan APIs. - #11960

Merged
rapids-bot[bot] merged 7 commits into
NVIDIA:branch-22.12from
vyasr:fix/issue_10393
Oct 21, 2022
Merged

Accept const refs instead of const unique_ptr refs in reduce and scan APIs.#11960
rapids-bot[bot] merged 7 commits into
NVIDIA:branch-22.12from
vyasr:fix/issue_10393

Conversation

@vyasr

@vyasr vyasr commented Oct 20, 2022

Copy link
Copy Markdown
Contributor

Description

There is almost never a good reason to pass arguments as unique_ptr<T> const&. Since those arguments cannot be modified, the only use case is accessing the underlying pointer, at which point the function better communicates its intent by accepting the underlying pointer/reference as an argument instead and is also more flexible as a result.

Resolves #10393

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@vyasr vyasr added 2 - In Progress Currently a work in progress code quality libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function breaking Breaking change labels Oct 20, 2022
@vyasr
vyasr requested a review from a team as a code owner October 20, 2022 22:05
@vyasr vyasr self-assigned this Oct 20, 2022
@vyasr
vyasr requested a review from a team as a code owner October 20, 2022 22:05
@vyasr
vyasr requested review from cwharris and ttnghia October 20, 2022 22:05
@github-actions github-actions Bot added the Java Affects Java cuDF API. label Oct 20, 2022
@vyasr

vyasr commented Oct 20, 2022

Copy link
Copy Markdown
Contributor Author

For whoever ends up reviewing this for the Java side (perhaps @jlowe) I don't think this breaking change has any impact on the Spark plugin, it only affects the JNI and I have made the necessary changes.

@github-actions github-actions Bot added the Python Affects Python cuDF API. label Oct 20, 2022

@bdice bdice 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.

Approving C++ and Cython changes.

Comment thread cpp/include/cudf/detail/scan.hpp Outdated
Comment thread cpp/include/cudf/detail/scan.hpp Outdated
Comment thread cpp/include/cudf/detail/scan.hpp Outdated
@vyasr
vyasr requested a review from a team as a code owner October 20, 2022 23:37
@vyasr
vyasr requested a review from shwina October 20, 2022 23:37
Co-authored-by: David Wendt <45795991+davidwendt@users.noreply.github.com>
Comment thread cpp/include/cudf/detail/scan.hpp Outdated
@davidwendt

Copy link
Copy Markdown
Contributor

Can you add a real description to this PR? It will be added to the changelog at the end of the release.

@bdice

bdice commented Oct 20, 2022

Copy link
Copy Markdown
Contributor

Can you add a real description to this PR? It will be added to the changelog at the end of the release.

Only the PR title is added to the changelog. The description is used for the merge commit message. (Still needs a real description.)

@codecov

codecov Bot commented Oct 21, 2022

Copy link
Copy Markdown

Codecov Report

Base: 87.40% // Head: 86.88% // Decreases project coverage by -0.52% ⚠️

Coverage data is based on head (16472ae) compared to base (f72c4ce).
Patch coverage: 82.35% of modified lines in pull request are covered.

❗ Current head 16472ae differs from pull request most recent head 97070bd. Consider uploading reports for the commit 97070bd to get more accurate results

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-22.12   #11960      +/-   ##
================================================
- Coverage         87.40%   86.88%   -0.53%     
================================================
  Files               133      133              
  Lines             21833    21982     +149     
================================================
+ Hits              19084    19099      +15     
- Misses             2749     2883     +134     
Impacted Files Coverage Δ
python/cudf/cudf/core/dataframe.py 93.73% <ø> (-0.05%) ⬇️
python/cudf/cudf/core/frame.py 93.68% <ø> (ø)
python/cudf/cudf/core/index.py 92.96% <ø> (+0.33%) ⬆️
python/cudf/cudf/core/indexed_frame.py 92.03% <ø> (ø)
python/cudf/cudf/core/scalar.py 90.52% <ø> (+1.25%) ⬆️
python/cudf/cudf/core/series.py 95.78% <ø> (+0.03%) ⬆️
python/cudf/cudf/core/udf/__init__.py 50.00% <ø> (ø)
python/cudf/cudf/io/orc.py 92.94% <ø> (-0.09%) ⬇️
python/cudf/cudf/io/text.py 91.66% <ø> (-8.34%) ⬇️
python/cudf/cudf/testing/dataset_generator.py 72.83% <ø> (-0.42%) ⬇️
... and 49 more

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.

@vyasr

vyasr commented Oct 21, 2022

Copy link
Copy Markdown
Contributor Author

Added a description

@vyasr

vyasr commented Oct 21, 2022

Copy link
Copy Markdown
Contributor Author

@gpucibot merge

@rapids-bot
rapids-bot Bot merged commit 9c06330 into NVIDIA:branch-22.12 Oct 21, 2022
@vyasr
vyasr deleted the fix/issue_10393 branch October 21, 2022 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2 - In Progress Currently a work in progress breaking Breaking change improvement Improvement / enhancement to an existing function Java Affects Java cuDF API. libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEA] Aggregation APIs shouldn't take aggregation parameters as unique_ptr

4 participants