()
| 5155 | |
| 5156 | #[test] |
| 5157 | fn test_call_with_description_in_yield() { |
| 5158 | // Bug #1: 'description' is a keyword but should be allowed as column name in YIELD |
| 5159 | let query = r#"CALL system.list_functions() |
| 5160 | YIELD name, category, description;"#; |
| 5161 | |
| 5162 | let result = parse_query(query); |
| 5163 | assert!( |
| 5164 | result.is_ok(), |
| 5165 | "Failed to parse CALL with 'description' in YIELD" |
| 5166 | ); |
| 5167 | |
| 5168 | let doc = result.unwrap(); |
| 5169 | if let Statement::Call(ref call_stmt) = doc.statement { |
| 5170 | assert_eq!(call_stmt.procedure_name, "system.list_functions"); |
| 5171 | |
| 5172 | let yield_clause = call_stmt |
| 5173 | .yield_clause |
| 5174 | .as_ref() |
| 5175 | .expect("YIELD clause should be present"); |
| 5176 | |
| 5177 | assert_eq!(yield_clause.items.len(), 3, "Should have 3 YIELD items"); |
| 5178 | assert_eq!(yield_clause.items[0].column_name, "name"); |
| 5179 | assert_eq!(yield_clause.items[1].column_name, "category"); |
| 5180 | assert_eq!(yield_clause.items[2].column_name, "description"); |
| 5181 | } else { |
| 5182 | panic!( |
| 5183 | "Expected CallStatement, got {:?}", |
| 5184 | std::mem::discriminant(&doc.statement) |
| 5185 | ); |
| 5186 | } |
| 5187 | } |
| 5188 | |
| 5189 | #[test] |
| 5190 | fn test_call_with_where_and_description() { |
nothing calls this directly
no test coverage detected