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

Add groupby::make_aggregation_request and groupby::make_scan_request factory functions #11476

Draft
wants to merge 1 commit into
base: branch-22.10
Choose a base branch
from

Conversation

ttnghia
Copy link
Contributor

@ttnghia ttnghia commented Aug 4, 2022

TBA

@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Aug 4, 2022
@github-actions
Copy link

github-actions bot commented Sep 4, 2022

This PR has been labeled inactive-30d due to no recent activity in the past 30 days. Please close this PR if it is no longer required. Otherwise, please respond with a comment indicating any updates. This PR will be labeled inactive-90d if there is no activity in the next 60 days.

@vyasr
Copy link
Contributor

vyasr commented Jan 22, 2024

@ttnghia do you recall if this is still something we need to do?

@ttnghia
Copy link
Contributor Author

ttnghia commented Jan 22, 2024

Yes, this is something that can simplify/shorten the code when we want to perform an aggregation. It is purely for convenient purposes.
For example, currently we want to write like this:

  std::vector<cudf::groupby::aggregation_request> requests;
  requests.emplace_back(cudf::groupby::aggregation_request());
  requests[0].values = values;
  requests[0].aggregations.emplace_back(cudf::make_argmin_aggregation<cudf::groupby_aggregation>());

  auto result = gb_obj.aggregate(requests,...);

We can do better by:

  auto const requests = make_aggregation_request(values, cudf::make_argmin_aggregation<cudf::groupby_aggregation>());
  auto result = gb_obj.aggregate(requests,...);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants