Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 4.3k
GH-32884: [C++] Add ordered aggregation#34311
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
b2b10cf636701e70acbe678af85e9627ddf624059601a946b54a5809e96ac771c4579b192dc87c92f8d05ac8c65111a7b9d85dac328fce61218e04c4f18abda633038e52439c7edcb1848d39eb967a07cd76323c7b6e9535e8cbc9d68efd4b11a6ca9e094fc6295691File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -199,21 +199,37 @@ class ARROW_EXPORT ProjectNodeOptions : public ExecNodeOptions { | ||
| std::vector<std::string> names; | ||
| }; | ||
| /// \brief Make a node which aggregates input batches, optionally grouped by keys. | ||
| /// \brief Make a node which aggregates input batches, optionally grouped by keys and | ||
| /// optionally segmented by segment-keys. Both keys and segment-keys determine the group. | ||
| /// However segment-keys are also used for determining grouping segments, which should be | ||
| /// large, and allow streaming a partial aggregation result after processing each segment. | ||
westonpace marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| /// One common use-case for segment-keys is ordered aggregation, in which the segment-key | ||
| /// attribute specifies a column with non-decreasing values or a lexicographically-ordered | ||
| /// set of such columns. | ||
| /// | ||
| /// If the keys attribute is a non-empty vector, then each aggregate in `aggregates` is | ||
| /// expected to be a HashAggregate function. If the keys attribute is an empty vector, | ||
| /// then each aggregate is assumed to be a ScalarAggregate function. | ||
| /// | ||
| /// If the segment_keys attribute is a non-empty vector, then segmented aggregation, as | ||
| /// described above, applies. | ||
| /// | ||
| /// The keys and segment_keys vectors must be disjoint. | ||
| class ARROW_EXPORT AggregateNodeOptions : public ExecNodeOptions { | ||
| public: | ||
| explicit AggregateNodeOptions(std::vector<Aggregate> aggregates, | ||
| std::vector<FieldRef> keys = {}) | ||
| : aggregates(std::move(aggregates)), keys(std::move(keys)) {} | ||
| std::vector<FieldRef> keys = {}, | ||
| std::vector<FieldRef> segment_keys = {}) | ||
| : aggregates(std::move(aggregates)), | ||
| keys(std::move(keys)), | ||
| segment_keys(std::move(segment_keys)) {} | ||
| // aggregations which will be applied to the targetted fields | ||
| std::vector<Aggregate> aggregates; | ||
| // keys by which aggregations will be grouped | ||
| // keys by which aggregations will be grouped (optional) | ||
| std::vector<FieldRef> keys; | ||
| // keys by which aggregations will be segmented (optional) | ||
| std::vector<FieldRef> segment_keys; | ||
westonpace marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| }; | ||
| constexpr int32_t kDefaultBackpressureHighBytes = 1 << 30; // 1GiB | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.