Skip to main content

is_alias_of_group_expr

Function is_alias_of_group_expr 

Source
fn is_alias_of_group_expr(group_expr: &Expr, expr: &Expr) -> Result<bool>
Expand description

Returns whether expr directly renames the group by expression group_expr.

Renames are identified only by expression name. Derived unary expressions are not group keys, even when they reference a single group key column. A PromQL count_values("label", metric) plan lands here too: it groups by the formatted sample value (prom_float_to_string(value)) and projects that group key column as the generated label.