24 #include <cudf/utilities/export.hpp>
35 namespace CUDF_EXPORT
cudf {
40 class sort_groupby_helper;
78 std::vector<std::unique_ptr<groupby_scan_aggregation>>
aggregations;
90 std::vector<std::unique_ptr<column>> results{};
130 sorted keys_are_sorted = sorted::NO,
131 std::vector<order>
const& column_order = {},
132 std::vector<null_order>
const& null_precedence = {});
187 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
aggregate(
196 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
aggregate(
251 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
scan(
305 std::pair<std::unique_ptr<table>, std::unique_ptr<table>>
shift(
308 std::vector<std::reference_wrapper<scalar const>>
const& fill_values,
382 null_policy _include_null_keys{null_policy::EXCLUDE};
384 sorted _keys_are_sorted{sorted::NO};
385 std::vector<order> _column_order{};
387 std::vector<null_order> _null_precedence{};
390 std::unique_ptr<detail::sort::sort_groupby_helper>
400 detail::sort::sort_groupby_helper& helper();
406 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> dispatch_aggregation(
407 host_span<aggregation_request const> requests,
412 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> sort_aggregate(
413 host_span<aggregation_request const> requests,
417 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> sort_scan(
418 host_span<scan_request const> requests,
Representation for specifying desired aggregations from aggregation-based APIs, e....
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Groups values by keys and computes aggregations on those groups.
groups get_groups(cudf::table_view values={}, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Get the grouped keys and values corresponding to a groupby operation on a set of values.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > aggregate(host_span< aggregation_request const > requests, rmm::cuda_stream_view stream, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped aggregations on the specified values.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > aggregate(host_span< aggregation_request const > requests, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped aggregations on the specified values.
groupby(table_view const &keys, null_policy null_handling=null_policy::EXCLUDE, sorted keys_are_sorted=sorted::NO, std::vector< order > const &column_order={}, std::vector< null_order > const &null_precedence={})
Construct a groupby object with the specified keys
std::pair< std::unique_ptr< table >, std::unique_ptr< table > > replace_nulls(table_view const &values, host_span< cudf::replace_policy const > replace_policies, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped replace nulls on value.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > scan(host_span< scan_request const > requests, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped scans on the specified values.
std::pair< std::unique_ptr< table >, std::unique_ptr< table > > shift(table_view const &values, host_span< size_type const > offsets, std::vector< std::reference_wrapper< scalar const >> const &fill_values, rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs grouped shifts for specified values.
A set of cudf::column_view's of the same size.
column view class definitions
std::unique_ptr< table > sort(table_view const &input, std::vector< order > const &column_order={}, std::vector< null_order > const &null_precedence={}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=rmm::mr::get_current_device_resource())
Performs a lexicographic sort of the rows of a table.
cuda::mr::async_resource_ref< cuda::mr::device_accessible > device_async_resource_ref
device_memory_resource * get_current_device_resource()
null_policy
Enum to specify whether to include nulls or exclude nulls.
sorted
Indicates whether a collection of values is known to be sorted.
Request for groupby aggregation(s) to perform on a column.
std::vector< std::unique_ptr< groupby_aggregation > > aggregations
Desired aggregations.
column_view values
The elements to aggregate.
The result(s) of an aggregation_request
The grouped data corresponding to a groupby operation on a set of values.
std::unique_ptr< table > keys
Table of grouped keys.
std::vector< size_type > offsets
Group Offsets.
std::unique_ptr< table > values
Table of grouped values.
Request for groupby aggregation(s) for scanning a column.
column_view values
The elements to aggregate.
std::vector< std::unique_ptr< groupby_scan_aggregation > > aggregations
Desired aggregations.
C++20 std::span with reduced feature set.
Class definitions for (mutable)_table_view
Type declarations for libcudf.