Remove duplicate rows from result set
(&self, mut rows: Vec<Row>)
| 8017 | |
| 8018 | /// Remove duplicate rows from result set |
| 8019 | fn deduplicate_rows(&self, mut rows: Vec<Row>) -> Vec<Row> { |
| 8020 | use std::collections::HashSet; |
| 8021 | |
| 8022 | let mut seen = HashSet::new(); |
| 8023 | let mut deduplicated = Vec::new(); |
| 8024 | |
| 8025 | for row in rows.drain(..) { |
| 8026 | if seen.insert(row.clone()) { |
| 8027 | deduplicated.push(row); |
| 8028 | } |
| 8029 | } |
| 8030 | |
| 8031 | deduplicated |
| 8032 | } |
| 8033 | |
| 8034 | /// Infer the type of a literal value |
| 8035 | #[allow(dead_code)] // ROADMAP v0.5.0 - Literal type inference for static analysis |
no test coverage detected