File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -303,12 +303,6 @@ mod tests {
303303
304304 #[ test]
305305 fn test_rewrite_sorts_different_column ( ) {
306- // Test: SELECT id FROM t ORDER BY value DESC LIMIT 1
307- // This WILL rewrite to SELECT MAX(value) FROM t
308- // Note: This changes query semantics - we lose the 'id' column!
309- // This is a limitation that should be addressed: only rewrite when
310- // the sort column matches the projected column
311-
312306 let input = test_table_scan ( ) . unwrap ( ) ;
313307
314308 let plan = LogicalPlanBuilder :: from ( input)
@@ -324,8 +318,7 @@ mod tests {
324318 let rule = RewriteLimitToAggregate :: new ( ) ;
325319 let result = rule. rewrite ( plan, & crate :: OptimizerContext :: new ( ) ) . unwrap ( ) ;
326320
327- // Currently this DOES transform (which is semantically incorrect)
328- assert ! ( result. transformed, "Currently transforms (but semantically changes query)" ) ;
321+ assert ! ( !result. transformed, "Should not transform for diff" ) ;
329322 }
330323
331324 // ============================================================================
You can’t perform that action at this time.
0 commit comments