Function mz_sqllogictest::runner::derive_order_by_from_projection

source ยท
fn derive_order_by_from_projection(
    projection: &Vec<SelectItem<Raw>>,
    order_by: &Vec<OrderByExpr<Raw>>,
) -> (Vec<OrderByExpr<Raw>>, Vec<SelectItem<Raw>>)
Expand description

Computes an ORDER BY clause with only numeric references from given projection and ORDER BY of a SELECT query. If the derivation fails to match a given expression, the matched prefix is returned. Note that this could be empty.