Perform a key-wise reduction / aggregation. The `group_key` argument indicates columns in the input collection that should be grouped, and `aggregates` lists aggregation functions each of which produces one output column in addition to the keys.
(
self,
group_key: Vec<usize>,
aggregates: Vec<AggregateExpr>,
expected_group_size: Option<u64>,
)
| 1325 | /// be grouped, and `aggregates` lists aggregation functions each of which produces |
| 1326 | /// one output column in addition to the keys. |
| 1327 | pub fn reduce( |
| 1328 | self, |
| 1329 | group_key: Vec<usize>, |
| 1330 | aggregates: Vec<AggregateExpr>, |
| 1331 | expected_group_size: Option<u64>, |
| 1332 | ) -> Self { |
| 1333 | MirRelationExpr::Reduce { |
| 1334 | input: Box::new(self), |
| 1335 | group_key: group_key.into_iter().map(MirScalarExpr::column).collect(), |
| 1336 | aggregates, |
| 1337 | monotonic: false, |
| 1338 | expected_group_size, |
| 1339 | } |
| 1340 | } |
| 1341 | |
| 1342 | /// Perform a key-wise reduction order by and limit. |
| 1343 | /// |
no test coverage detected