()
| 126 | |
| 127 | #[test] |
| 128 | fn test_subquery_with_arithmetic() { |
| 129 | let conn = setup_test_db(); |
| 130 | |
| 131 | let sql = "SELECT name, |
| 132 | (SELECT SUM(total + tax) FROM orders WHERE customer_id = c.id) as total_with_tax |
| 133 | FROM customers c"; |
| 134 | let result = rewrite_query(&conn, sql).unwrap(); |
| 135 | |
| 136 | println!("Subquery with arithmetic rewritten to: {result}"); |
| 137 | assert!(result.contains("decimal_add")); |
| 138 | } |
| 139 | |
| 140 | #[test] |
| 141 | fn test_derived_table_subquery() { |
nothing calls this directly
no test coverage detected