()
| 112 | |
| 113 | #[test] |
| 114 | fn test_mixed_table_queries() { |
| 115 | let conn = setup_test_db(); |
| 116 | |
| 117 | // JOIN between decimal and non-decimal tables - should be rewritten |
| 118 | let sql = "SELECT u.name, p.price |
| 119 | FROM users u |
| 120 | JOIN products p ON u.id = p.id |
| 121 | WHERE p.price > 50"; |
| 122 | let result = rewrite_query(&conn, sql).unwrap(); |
| 123 | println!("Mixed table query rewritten to: {result}"); |
| 124 | assert!(result.contains("decimal_gt")); |
| 125 | |
| 126 | // But operations on non-decimal columns should not be wrapped |
| 127 | assert!(!result.contains("decimal_from_text(u.id)")); |
| 128 | } |
| 129 | |
| 130 | #[test] |
| 131 | fn test_subquery_optimization() { |
nothing calls this directly
no test coverage detected