()
| 194 | |
| 195 | #[test] |
| 196 | fn test_implicit_cast_mixed_arithmetic() { |
| 197 | let conn = setup_test_db(); |
| 198 | |
| 199 | // Test: Complex expression with mixed types |
| 200 | let sql = "SELECT (quantity * 2 + 5) * price / 100 FROM products"; |
| 201 | let result = rewrite_query(&conn, sql).unwrap(); |
| 202 | |
| 203 | // Debug: print the rewritten query |
| 204 | println!("Rewritten mixed arithmetic query: {result}"); |
| 205 | |
| 206 | // Should handle type promotion throughout the expression |
| 207 | assert!(result.contains("decimal_mul")); |
| 208 | assert!(result.contains("decimal_add")); |
| 209 | assert!(result.contains("decimal_div")); |
| 210 | assert!(result.contains("decimal_from_text")); |
| 211 | } |
nothing calls this directly
no test coverage detected