MCPcopy Create free account
hub / github.com/erans/pgsqlite / test_aggregate_needs_wrapping

Function test_aggregate_needs_wrapping

tests/decimal_simple_select_test.rs:90–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

88
89#[test]
90fn test_aggregate_needs_wrapping() {
91 let conn = setup_test_db();
92
93 // Test 4: Aggregates on decimal columns SHOULD be wrapped
94 let sql = "SELECT SUM(price) FROM products";
95 let result = rewrite_query(&conn, sql).unwrap();
96 println!("Aggregate rewritten to: {result}");
97
98 // Aggregates should wrap the column in decimal_from_text
99 assert!(result.contains("decimal_from_text"));
100}

Callers

nothing calls this directly

Calls 2

setup_test_dbFunction · 0.70
rewrite_queryFunction · 0.70

Tested by

no test coverage detected