@@ -359,7 +359,8 @@ async fn test_do_not_remove_sort_with_limit() -> Result<()> {
359359 let repartition = repartition_exec ( union) ;
360360 let physical_plan = sort_preserving_merge_exec ( ordering, repartition) ;
361361
362- let test = EnforceSortingTest :: new ( physical_plan) . with_repartition_sorts ( true ) ;
362+ let test = EnforceSortingTest :: new ( physical_plan) . with_repartition_sorts ( true )
363+ . with_expected_description ( "// We should keep the bottom `SortExec`." ) ;
363364 insta:: assert_snapshot!( test. run( ) , @r#"
364365 let expected_input = [
365366 "SortPreservingMergeExec: [nullable_col@0 ASC, non_nullable_col@1 ASC]",
@@ -395,10 +396,10 @@ async fn test_union_inputs_sorted() -> Result<()> {
395396 let union = union_exec ( vec ! [ source2, sort] ) ;
396397 let physical_plan = sort_preserving_merge_exec ( ordering, union) ;
397398
399+ // one input to the union is already sorted, one is not.
398400 let test = EnforceSortingTest :: new ( physical_plan)
399401 . with_repartition_sorts ( true )
400- // one input to the union is already sorted, one is not.
401- // should not add a sort at the output of the union, input plan should not be changed
402+ . with_expected_description ( "// should not add a sort at the output of the union, input plan should not be changed" )
402403 . with_expect_no_change ( true ) ;
403404
404405 insta:: assert_snapshot!( test. run( ) , @r#"
@@ -436,10 +437,10 @@ async fn test_union_inputs_different_sorted() -> Result<()> {
436437 let union = union_exec ( vec ! [ source2, sort] ) ;
437438 let physical_plan = sort_preserving_merge_exec ( ordering, union) ;
438439
440+ // one input to the union is already sorted, one is not.
439441 let test = EnforceSortingTest :: new ( physical_plan)
440442 . with_repartition_sorts ( true )
441- // one input to the union is already sorted, one is not.
442- // should not add a sort at the output of the union, input plan should not be changed
443+ . with_expected_description ( "// should not add a sort at the output of the union, input plan should not be changed" )
443444 . with_expect_no_change ( true ) ;
444445 insta:: assert_snapshot!( test. run( ) , @r#"
445446 let expected_input = [
@@ -724,8 +725,7 @@ async fn test_union_inputs_different_sorted7() -> Result<()> {
724725
725726 // Union has unnecessarily fine ordering below it. We should be able to replace them with absolutely necessary ordering.
726727 let test = EnforceSortingTest :: new ( physical_plan) . with_repartition_sorts ( true )
727- . with_expected_description ( "// Union preserves the inputs ordering and we should not change any of the SortExecs under UnionExec
728- " ) ;
728+ . with_expected_description ( "// Union preserves the inputs ordering and we should not change any of the SortExecs under UnionExec" ) ;
729729 insta:: assert_snapshot!( test. run( ) , @r#"
730730 let expected_input = [
731731 "SortPreservingMergeExec: [nullable_col@0 ASC]",
@@ -784,7 +784,6 @@ async fn test_union_inputs_different_sorted8() -> Result<()> {
784784
785785 // The `UnionExec` doesn't preserve any of the inputs ordering in the
786786 // example below.
787-
788787 let test = EnforceSortingTest :: new ( physical_plan)
789788 . with_repartition_sorts ( true )
790789 . with_expected_description (
0 commit comments