@@ -220,35 +220,16 @@ async fn test_remove_unnecessary_sort5() -> Result<()> {
220
220
) ] ;
221
221
let join = hash_join_exec ( left_input, right_input, on, None , & JoinType :: Inner ) ?;
222
222
let physical_plan = sort_exec ( vec ! [ sort_expr( "a" , & join. schema( ) ) ] , join) ;
223
- let mut config = ConfigOptions :: new ( ) ;
224
- config. optimizer . repartition_sorts = true ;
225
- let optimized_physical_plan =
226
- EnforceSorting :: new ( ) . optimize ( physical_plan. clone ( ) , & config) ?;
227
- let plan_formatted = displayable ( physical_plan. as_ref ( ) ) . indent ( true ) . to_string ( ) ;
228
- let optimized_plan_formatted = displayable ( optimized_physical_plan. as_ref ( ) )
229
- . indent ( true )
230
- . to_string ( ) ;
231
- let actual = plan_formatted. trim ( ) ;
232
- let optimized_actual = optimized_plan_formatted. trim ( ) ;
233
-
234
- // let expected_input = ["SortExec: expr=[a@2 ASC], preserve_partitioning=[false]",
235
- // " HashJoinExec: mode=Partitioned, join_type=Inner, on=[(col_a@0, c@2)]",
236
- // " DataSourceExec: partitions=1, partition_sizes=[0]",
237
- // " DataSourceExec: file_groups={1 group: [[x]]}, projection=[a, b, c, d, e], output_ordering=[a@0 ASC], file_type=parquet"];
238
-
239
- // let expected_optimized = ["HashJoinExec: mode=Partitioned, join_type=Inner, on=[(col_a@0, c@2)]",
240
- // " DataSourceExec: partitions=1, partition_sizes=[0]",
241
- // " DataSourceExec: file_groups={1 group: [[x]]}, projection=[a, b, c, d, e], output_ordering=[a@0 ASC], file_type=parquet"];
242
- // assert_optimized!(expected_input, expected_optimized, physical_plan, true);
243
- assert_snapshot ! (
244
- actual,
245
- @""
246
- ) ;
247
223
248
- assert_snapshot ! (
249
- optimized_actual,
250
- @""
251
- ) ;
224
+ let expected_input = [ "SortExec: expr=[a@2 ASC], preserve_partitioning=[false]" ,
225
+ " HashJoinExec: mode=Partitioned, join_type=Inner, on=[(col_a@0, c@2)]" ,
226
+ " DataSourceExec: partitions=1, partition_sizes=[0]" ,
227
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[a, b, c, d, e], output_ordering=[a@0 ASC], file_type=parquet" ] ;
228
+
229
+ let expected_optimized = [ "HashJoinExec: mode=Partitioned, join_type=Inner, on=[(col_a@0, c@2)]" ,
230
+ " DataSourceExec: partitions=1, partition_sizes=[0]" ,
231
+ " DataSourceExec: file_groups={1 group: [[x]]}, projection=[a, b, c, d, e], output_ordering=[a@0 ASC], file_type=parquet" ] ;
232
+ assert_optimized ! ( expected_input, expected_optimized, physical_plan, true ) ;
252
233
253
234
Ok ( ( ) )
254
235
}
0 commit comments