@@ -2696,8 +2696,9 @@ async fn test_window_partial_constant_and_set_monotonicity() -> Result<()> {
2696
2696
" DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
2697
2697
] ,
2698
2698
expected_plan: vec![
2699
- "WindowAggExec: wdw=[count: Ok(Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }), frame: WindowFrame { units: Rows, start_bound: Preceding(UInt64(NULL)), end_bound: Following(UInt64(NULL)), is_causal: false }]" ,
2700
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
2699
+ "SortExec: expr=[nullable_col@0 ASC NULLS LAST, count@2 ASC NULLS LAST], preserve_partitioning=[false]" ,
2700
+ " WindowAggExec: wdw=[count: Ok(Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }), frame: WindowFrame { units: Rows, start_bound: Preceding(UInt64(NULL)), end_bound: Following(UInt64(NULL)), is_causal: false }]" ,
2701
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
2701
2702
] ,
2702
2703
} ,
2703
2704
// Case 9:
@@ -2712,8 +2713,9 @@ async fn test_window_partial_constant_and_set_monotonicity() -> Result<()> {
2712
2713
" DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
2713
2714
] ,
2714
2715
expected_plan: vec![
2715
- "WindowAggExec: wdw=[max: Ok(Field { name: \" max\" , data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }), frame: WindowFrame { units: Rows, start_bound: Preceding(UInt64(NULL)), end_bound: Following(UInt64(NULL)), is_causal: false }]" ,
2716
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
2716
+ "SortExec: expr=[nullable_col@0 ASC NULLS LAST, max@2 DESC NULLS LAST], preserve_partitioning=[false]" ,
2717
+ " WindowAggExec: wdw=[max: Ok(Field { name: \" max\" , data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }), frame: WindowFrame { units: Rows, start_bound: Preceding(UInt64(NULL)), end_bound: Following(UInt64(NULL)), is_causal: false }]" ,
2718
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
2717
2719
] ,
2718
2720
} ,
2719
2721
// Case 10:
@@ -2978,8 +2980,9 @@ async fn test_window_partial_constant_and_set_monotonicity() -> Result<()> {
2978
2980
" DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
2979
2981
] ,
2980
2982
expected_plan: vec![
2981
- "WindowAggExec: wdw=[count: Ok(Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }), frame: WindowFrame { units: Rows, start_bound: CurrentRow, end_bound: Following(UInt64(NULL)), is_causal: false }]" ,
2982
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
2983
+ "SortExec: expr=[nullable_col@0 ASC NULLS LAST, count@2 DESC NULLS LAST], preserve_partitioning=[false]" ,
2984
+ " WindowAggExec: wdw=[count: Ok(Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }), frame: WindowFrame { units: Rows, start_bound: CurrentRow, end_bound: Following(UInt64(NULL)), is_causal: false }]" ,
2985
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
2983
2986
] ,
2984
2987
} ,
2985
2988
// Case 25:
@@ -3066,8 +3069,9 @@ async fn test_window_partial_constant_and_set_monotonicity() -> Result<()> {
3066
3069
" DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3067
3070
] ,
3068
3071
expected_plan: vec![
3069
- "WindowAggExec: wdw=[max: Ok(Field { name: \" max\" , data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }), frame: WindowFrame { units: Rows, start_bound: CurrentRow, end_bound: Following(UInt64(NULL)), is_causal: false }]" ,
3070
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3072
+ "SortExec: expr=[nullable_col@0 ASC NULLS LAST, max@2 DESC], preserve_partitioning=[false]" ,
3073
+ " WindowAggExec: wdw=[max: Ok(Field { name: \" max\" , data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }), frame: WindowFrame { units: Rows, start_bound: CurrentRow, end_bound: Following(UInt64(NULL)), is_causal: false }]" ,
3074
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3071
3075
] ,
3072
3076
} ,
3073
3077
// Case 30:
@@ -3260,8 +3264,9 @@ async fn test_window_partial_constant_and_set_monotonicity() -> Result<()> {
3260
3264
" DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3261
3265
] ,
3262
3266
expected_plan: vec![
3263
- "BoundedWindowAggExec: wdw=[count: Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3264
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3267
+ "SortExec: expr=[nullable_col@0 ASC NULLS LAST, count@2 ASC NULLS LAST], preserve_partitioning=[false]" ,
3268
+ " BoundedWindowAggExec: wdw=[count: Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3269
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3265
3270
] ,
3266
3271
} ,
3267
3272
// Case 41:
@@ -3364,8 +3369,9 @@ async fn test_window_partial_constant_and_set_monotonicity() -> Result<()> {
3364
3369
" DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3365
3370
] ,
3366
3371
expected_plan: vec![
3367
- "BoundedWindowAggExec: wdw=[min: Field { name: \" min\" , data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3368
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3372
+ "SortExec: expr=[nullable_col@0 ASC NULLS LAST, min@2 DESC NULLS LAST], preserve_partitioning=[false]" ,
3373
+ " BoundedWindowAggExec: wdw=[min: Field { name: \" min\" , data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3374
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3369
3375
] ,
3370
3376
} ,
3371
3377
// Case 47:
@@ -3400,8 +3406,9 @@ async fn test_window_partial_constant_and_set_monotonicity() -> Result<()> {
3400
3406
" DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3401
3407
] ,
3402
3408
expected_plan: vec![
3403
- "BoundedWindowAggExec: wdw=[count: Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN 1 PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3404
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3409
+ "SortExec: expr=[count@2 ASC NULLS LAST, nullable_col@0 ASC NULLS LAST], preserve_partitioning=[false]" ,
3410
+ " BoundedWindowAggExec: wdw=[count: Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN 1 PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3411
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3405
3412
] ,
3406
3413
} ,
3407
3414
// Case 49:
@@ -3433,8 +3440,9 @@ async fn test_window_partial_constant_and_set_monotonicity() -> Result<()> {
3433
3440
" DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3434
3441
] ,
3435
3442
expected_plan: vec![
3436
- "BoundedWindowAggExec: wdw=[min: Field { name: \" min\" , data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN 1 PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3437
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3443
+ "SortExec: expr=[nullable_col@0 ASC NULLS LAST, min@2 DESC NULLS LAST], preserve_partitioning=[false]" ,
3444
+ " BoundedWindowAggExec: wdw=[min: Field { name: \" min\" , data_type: Int32, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN 1 PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3445
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3438
3446
] ,
3439
3447
} ,
3440
3448
// Case 51:
@@ -3541,8 +3549,9 @@ async fn test_window_partial_constant_and_set_monotonicity() -> Result<()> {
3541
3549
" DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3542
3550
] ,
3543
3551
expected_plan: vec![
3544
- "BoundedWindowAggExec: wdw=[count: Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN 1 PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3545
- " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3552
+ "SortExec: expr=[count@2 ASC NULLS LAST, nullable_col@0 ASC NULLS LAST], preserve_partitioning=[false]" ,
3553
+ " BoundedWindowAggExec: wdw=[count: Field { name: \" count\" , data_type: Int64, nullable: false, dict_id: 0, dict_is_ordered: false, metadata: {} }, frame: ROWS BETWEEN 1 PRECEDING AND CURRENT ROW], mode=[Sorted]" ,
3554
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[nullable_col, non_nullable_col], output_ordering=[nullable_col@0 ASC NULLS LAST], file_type=parquet" ,
3546
3555
] ,
3547
3556
} ,
3548
3557
// Case 57:
0 commit comments