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

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

Merged
merged 7 commits into from
Oct 21, 2022

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Oct 20, 2022

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
@github-actions github-actions bot added the Java Affects Java cuDF API. label Oct 20, 2022
@vyasr
Copy link
Contributor Author

vyasr commented Oct 20, 2022

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
Copy link
Contributor

@bdice bdice left a comment

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.

@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>
@davidwendt
Copy link
Contributor

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

@bdice
Copy link
Contributor

bdice commented Oct 20, 2022

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
Copy link

codecov bot commented Oct 21, 2022

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
Copy link
Contributor Author

vyasr commented Oct 21, 2022

Added a description

@vyasr
Copy link
Contributor Author

vyasr commented Oct 21, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 9c06330 into rapidsai: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