()
| 116 | |
| 117 | #[test] |
| 118 | fn test_implicit_cast_function_argument() { |
| 119 | let conn = setup_test_db(); |
| 120 | |
| 121 | // Test: ROUND(integer_column) should cast to decimal |
| 122 | let sql = "SELECT ROUND(quantity) FROM products"; |
| 123 | let result = rewrite_query(&conn, sql).unwrap(); |
| 124 | |
| 125 | // Debug: print the rewritten query |
| 126 | println!("Rewritten query: {result}"); |
| 127 | |
| 128 | // Should wrap integer column in decimal_from_text |
| 129 | assert!(result.contains("decimal_round")); |
| 130 | assert!(result.contains("decimal_from_text")); |
| 131 | } |
| 132 | |
| 133 | #[test] |
| 134 | fn test_implicit_cast_in_where_clause() { |
nothing calls this directly
no test coverage detected