(
rows: &[Vec<Value>],
a: usize,
b: usize,
column_index: &HashMap<String, usize>,
order_by: &[(SqlExpr, bool)],
)
| 141 | } |
| 142 | |
| 143 | pub(super) fn order_keys_equal_v( |
| 144 | rows: &[Vec<Value>], |
| 145 | a: usize, |
| 146 | b: usize, |
| 147 | column_index: &HashMap<String, usize>, |
| 148 | order_by: &[(SqlExpr, bool)], |
| 149 | ) -> bool { |
| 150 | order_by.iter().all(|(expr, _)| { |
| 151 | let row_a = rows.get(a).map(|r| r.as_slice()).unwrap_or(&[]); |
| 152 | let row_b = rows.get(b).map(|r| r.as_slice()).unwrap_or(&[]); |
| 153 | let va = eval_arg_for_row(expr, row_a, column_index); |
| 154 | let vb = eval_arg_for_row(expr, row_b, column_index); |
| 155 | matches!(cmp_values(&va, &vb), std::cmp::Ordering::Equal) |
| 156 | }) |
| 157 | } |
| 158 | |
| 159 | // ── Argument evaluation (pub(super) for value_agg) ──────────────────────────── |
| 160 |
no test coverage detected