13 #include <cudf/utilities/export.hpp>
23 namespace CUDF_EXPORT
cudf {
28 struct sort_groupby_helper;
66 std::vector<std::unique_ptr<groupby_scan_aggregation>>
aggregations;
78 std::vector<std::unique_ptr<column>> results{};
118 sorted keys_are_sorted = sorted::NO,
119 std::vector<order>
const& column_order = {},
120 std::vector<null_order>
const& null_precedence = {});
176 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
aggregate(
232 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>>
scan(
288 std::pair<std::unique_ptr<table>, std::unique_ptr<table>>
shift(
291 std::vector<std::reference_wrapper<scalar const>>
const& fill_values,
370 null_policy _include_null_keys{null_policy::EXCLUDE};
372 sorted _keys_are_sorted{sorted::NO};
373 std::vector<order> _column_order{};
375 std::vector<null_order> _null_precedence{};
378 std::unique_ptr<detail::sort::sort_groupby_helper>
388 detail::sort::sort_groupby_helper& helper();
394 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> dispatch_aggregation(
395 host_span<aggregation_request const> requests,
400 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> sort_aggregate(
401 host_span<aggregation_request const> requests,
405 std::pair<std::unique_ptr<table>, std::vector<aggregation_result>> sort_scan(
406 host_span<scan_request const> requests,
571 std::unique_ptr<impl> _impl;
573 void do_aggregate(
table_view const& data,
rmm::cuda_stream_view stream);
Representation for specifying desired aggregations from aggregation-based APIs, e....
Abstract base class for specifying the desired aggregation in an aggregation_request.
A non-owning, immutable view of device data as a column of elements, some of which may be null as ind...
Indicator for the logical data type of an element in a column.
Groups values by keys and computes aggregations on those groups.
std::pair< std::unique_ptr< table >, std::vector< aggregation_result > > scan(host_span< scan_request const > requests, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Performs grouped scans on the specified values.
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::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Performs grouped replace nulls on value.
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::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Performs grouped shifts for 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::vector< aggregation_result > > aggregate(host_span< aggregation_request const > requests, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Performs grouped aggregations on the specified values.
groups get_groups(cudf::table_view values={}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Get the grouped keys and values corresponding to a groupby operation on a set of values.
Stateful streaming groupby that accumulates partial aggregates across batches.
streaming_groupby(streaming_groupby &&) noexcept
Move constructor.
A set of cudf::column_view's of the same size.
A set of cudf::column's of the same size.
column view class definitions
bool is_streaming_groupby_supported(data_type values_type, aggregation::Kind kind)
Returns true if streaming_groupby supports the given value type and aggregation kind combination.
std::unique_ptr< cudf::table > merge(std::vector< table_view > const &tables_to_merge, std::vector< cudf::size_type > const &key_cols, std::vector< cudf::order > const &column_order, std::vector< cudf::null_order > const &null_precedence={}, rmm::cuda_stream_view stream=cudf::get_default_stream(), rmm::device_async_resource_ref mr=cudf::get_current_device_resource_ref())
Merge a set of sorted tables.
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=cudf::get_current_device_resource_ref())
Performs a lexicographic sort of the rows of a table.
rmm::cuda_stream_view const get_default_stream()
Get the current default stream.
rmm::device_async_resource_ref get_current_device_resource_ref()
Get the current device memory resource reference.
device_async_resource_ref get_current_device_resource_ref()
cuda::mr::resource_ref< cuda::mr::device_accessible > device_async_resource_ref
int32_t size_type
Row index type for columns and tables.
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.
Request for a single streaming groupby aggregation on a column.
std::unique_ptr< groupby_aggregation > aggregation
Desired aggregation.
size_type column_index
Index of the value column.
C++20 std::span with reduced feature set.
Class definitions for (mutable)_table_view
Type declarations for libcudf.