Extract the column indices used in this projection. For example, for a projection `SELECT a AS x, b + 1 AS y`, where `a` is at index 0 and `b` is at index 1, this function would return `[0, 1]`. Repeated indices are returned only once, and the order is ascending.
(&self)
| 386 | /// this function would return `[0, 1]`. |
| 387 | /// Repeated indices are returned only once, and the order is ascending. |
| 388 | pub fn column_indices(&self) -> Vec<usize> { |
| 389 | self.exprs |
| 390 | .iter() |
| 391 | .flat_map(|e| collect_columns(&e.expr).into_iter().map(|col| col.index())) |
| 392 | .sorted_unstable() |
| 393 | .dedup() |
| 394 | .collect_vec() |
| 395 | } |
| 396 | |
| 397 | /// Extract the ordered column indices for a column-only projection. |
| 398 | /// |
no test coverage detected