`on_unique` for `first_value` and `last_value`
(
window_frame: &WindowFrame,
arg: MirScalarExpr,
return_type: ReprScalarType,
)
| 3154 | |
| 3155 | /// `on_unique` for `first_value` and `last_value` |
| 3156 | fn on_unique_first_value_last_value( |
| 3157 | window_frame: &WindowFrame, |
| 3158 | arg: MirScalarExpr, |
| 3159 | return_type: ReprScalarType, |
| 3160 | ) -> (MirScalarExpr, ColumnName) { |
| 3161 | // If the window frame includes the current (single) row, return its value, null otherwise |
| 3162 | let result_expr = if window_frame.includes_current_row() { |
| 3163 | arg |
| 3164 | } else { |
| 3165 | MirScalarExpr::literal_null(return_type) |
| 3166 | }; |
| 3167 | (result_expr, ColumnName::from("?first_value?")) |
| 3168 | } |
| 3169 | |
| 3170 | /// `on_unique` for window aggregations |
| 3171 | fn on_unique_window_agg( |
nothing calls this directly
no test coverage detected