pub fn count_all_window() -> Expr
Expand description
Creates window aggregation to count all rows.
In SQL this is SELECT COUNT(*) OVER (..) ...
The expression is equivalent to COUNT(*)
, COUNT()
, COUNT(1)
Example
// create `count(*)` OVER ... window function expression
let expr = count_all_window();
assert_eq!(
expr.schema_name().to_string(),
"count(Int64(1)) ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING"
);
// if you need to refer to this column, use the `schema_name` function
let expr = col(expr.schema_name().to_string());