The expected input is in the format of `[((OriginalRow, [EncodedArgs]), OrderByExprs...)]` The output is in the format of `[result_value, original_row]`. See an example at `lag_lead`, where the input-output formats are similar.
(
datums: I,
callers_temp_storage: &'a RowArena,
order_by: &[ColumnOrder],
)
| 442 | /// The output is in the format of `[result_value, original_row]`. |
| 443 | /// See an example at `lag_lead`, where the input-output formats are similar. |
| 444 | fn row_number<'a, I>( |
| 445 | datums: I, |
| 446 | callers_temp_storage: &'a RowArena, |
| 447 | order_by: &[ColumnOrder], |
| 448 | ) -> Datum<'a> |
| 449 | where |
| 450 | I: IntoIterator<Item = Datum<'a>>, |
| 451 | { |
| 452 | // We want to use our own temp_storage here, to avoid flooding `callers_temp_storage` with a |
| 453 | // large number of new datums. This is because we don't want to make an assumption about |
| 454 | // whether the caller creates a new temp_storage between window partitions. |
| 455 | let temp_storage = RowArena::new(); |
| 456 | let datums = row_number_no_list(datums, &temp_storage, order_by); |
| 457 | |
| 458 | callers_temp_storage.make_datum(|packer| { |
| 459 | packer.push_list(datums); |
| 460 | }) |
| 461 | } |
| 462 | |
| 463 | /// Like `row_number`, but doesn't perform the final wrapping in a list, returning an Iterator |
| 464 | /// instead. |
no test coverage detected