Validate YIELD clause
(yield_clause: &YieldClause, errors: &mut Vec<ValidationError>)
| 2312 | |
| 2313 | /// Validate YIELD clause |
| 2314 | fn validate_yield_clause(yield_clause: &YieldClause, errors: &mut Vec<ValidationError>) { |
| 2315 | // Check for duplicate column names/aliases |
| 2316 | let mut seen_names = std::collections::HashSet::new(); |
| 2317 | |
| 2318 | for item in &yield_clause.items { |
| 2319 | let output_name = item.alias.as_ref().unwrap_or(&item.column_name); |
| 2320 | |
| 2321 | if !seen_names.insert(output_name) { |
| 2322 | errors.push(ValidationError { |
| 2323 | message: format!("Duplicate YIELD column: {}", output_name), |
| 2324 | location: Some(item.location.clone()), |
| 2325 | error_type: ValidationErrorType::Semantic, |
| 2326 | }); |
| 2327 | } |
| 2328 | } |
| 2329 | } |
| 2330 | |
| 2331 | /// Validate SELECT statement |
| 2332 | fn validate_select_statement( |
no test coverage detected