()
| 5350 | |
| 5351 | #[test] |
| 5352 | fn test_call_complex_where_expression() { |
| 5353 | // Combined test: Complex WHERE with IN, OR, and description in YIELD |
| 5354 | let query = r#"CALL system.list_functions() |
| 5355 | YIELD name, category, description |
| 5356 | WHERE category IN ('string', 'numeric') OR category = 'aggregate';"#; |
| 5357 | |
| 5358 | let result = parse_query(query); |
| 5359 | assert!(result.is_ok(), "Failed to parse complex WHERE expression"); |
| 5360 | |
| 5361 | let doc = result.unwrap(); |
| 5362 | if let Statement::Call(ref call_stmt) = doc.statement { |
| 5363 | assert!(call_stmt.yield_clause.is_some(), "YIELD should be present"); |
| 5364 | assert!(call_stmt.where_clause.is_some(), "WHERE should be present"); |
| 5365 | |
| 5366 | // Verify it's an OR expression |
| 5367 | match &call_stmt.where_clause.as_ref().unwrap().condition { |
| 5368 | Expression::Binary(binary) => { |
| 5369 | assert_eq!( |
| 5370 | binary.operator, |
| 5371 | Operator::Or, |
| 5372 | "Top-level should be OR operator" |
| 5373 | ); |
| 5374 | } |
| 5375 | other => panic!("Expected OR binary expression, got {:?}", other), |
| 5376 | } |
| 5377 | } else { |
| 5378 | panic!("Expected CallStatement"); |
| 5379 | } |
| 5380 | } |
| 5381 | |
| 5382 | #[test] |
| 5383 | fn test_call_valid_without_where() { |
nothing calls this directly
no test coverage detected