162762 {
162764
162765 idx_t payload_idx = 0;
162766 idx_t next_payload_idx = 0;
162767
162768 for (
idx_t aggr_idx = 0; aggr_idx <
aggregates.size(); aggr_idx++) {
162769 auto &aggregate =
aggregates[aggr_idx]->Cast<BoundAggregateExpression>();
162770
162771 payload_idx = next_payload_idx;
162772 next_payload_idx = payload_idx + aggregate.children.size();
162773
162774 if (aggregate.IsDistinct()) {
162775 continue;
162776 }
162777
162778 idx_t payload_cnt = 0;
162779
162780 if (aggregate.filter) {
162781 auto &filtered_data =
filter_set.GetFilterData(aggr_idx);
162782 auto count = filtered_data.ApplyFilter(input);
162783
162785 payload_chunk.SetCardinality(count);
162786 } else {
162788 payload_chunk.SetCardinality(input);
162789 }
162790
162791
162792 for (
idx_t i = 0; i < aggregate.children.size(); ++i) {
162793 child_executor.ExecuteExpression(payload_idx + payload_cnt, payload_chunk.
data[payload_idx + payload_cnt]);
162794 payload_cnt++;
162795 }
162796
162797 state.Sink(payload_chunk, payload_idx, aggr_idx);
162798 }
162799}
vector< Vector > data
The vectors owned by the DataChunk.
Definition duckdb.hpp:11445
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237