wiedld commented on code in PR #14821:
URL: https://github.com/apache/datafusion/pull/14821#discussion_r1975847459


##########
datafusion/core/tests/physical_optimizer/enforce_sorting.rs:
##########
@@ -2242,7 +2242,7 @@ async fn 
test_window_partial_constant_and_set_monotonicity() -> Result<()> {
                 "    DataSourceExec: file_groups={1 group: [[x]]}, 
projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 
ASC NULLS LAST], file_type=parquet",
             ],
             expected_plan: vec![
-                "SortExec: expr=[non_nullable_col@1 ASC NULLS LAST, count@2 
ASC NULLS LAST], preserve_partitioning=[false]",
+                "SortExec: expr=[non_nullable_col@1 ASC NULLS LAST], 
preserve_partitioning=[false]",

Review Comment:
   This test change is actually ok.
   
   The window agg is unpartitioned, and unbounded. Therefore the count value is 
constant across all rows; and therefore can be removed from the `SortExec`. 
Therefore we think this change is an improvement.
   
   The reason this plan got better is because the `pushdown_sorts` is now 
recreating the sort from the eq props (that removes the constants), rather than 
re-attaching the existing sort node (as does main).



-- 
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: github-unsubscr...@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to