blaginin commented on code in PR #27439:
URL: https://github.com/apache/datafusion/pull/27439#discussion_r4591188959


##########
datafusion/core/tests/physical_optimizer/enforce_sorting_monotonicity.rs:
##########
@@ -1505,10 +1501,14 @@ fn 
test_window_partial_constant_and_set_monotonicity_49() {
         ],
     }.run(),
         @ r#"
-    Input / Optimized Plan:
+    Input Plan:
     SortExec: expr=[max@2 ASC NULLS LAST], preserve_partitioning=[false]
       BoundedWindowAggExec: wdw=[max: Field { "max": nullable Int32 }, frame: 
ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING], mode=[Sorted]
         DataSourceExec: file_groups={1 group: [[x]]}, 
projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 
ASC NULLS LAST], file_type=parquet
+
+    Optimized Plan:

Review Comment:
   🥳 We can remove this sort because the input is sorted by `x ASC NULLS LAST`, 
so the sliding `MAX(x)` never decreases and any NULL results appear at the end



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to