@@ -1441,8 +1441,10 @@ mod tests {
14411441 use super :: * ;
14421442 use crate :: coalesce_partitions:: CoalescePartitionsExec ;
14431443 use crate :: collect;
1444+ use crate :: empty:: EmptyExec ;
14441445 use crate :: execution_plan:: Boundedness ;
14451446 use crate :: expressions:: col;
1447+ use crate :: filter_pushdown:: { FilterPushdownPhase , PushedDown } ;
14461448 use crate :: test;
14471449 use crate :: test:: TestMemoryExec ;
14481450 use crate :: test:: exec:: { BlockingExec , assert_strong_count_converges_to_zero} ;
@@ -1453,14 +1455,18 @@ mod tests {
14531455 use arrow:: datatypes:: * ;
14541456 use datafusion_common:: cast:: as_primitive_array;
14551457 use datafusion_common:: test_util:: batches_to_string;
1458+ use datafusion_common:: config:: ConfigOptions ;
14561459 use datafusion_common:: { DataFusionError , Result , ScalarValue } ;
14571460 use datafusion_execution:: RecordBatchStream ;
1461+ use datafusion_execution:: memory_pool:: {
1462+ GreedyMemoryPool , MemoryConsumer , MemoryPool ,
1463+ } ;
14581464 use datafusion_execution:: config:: SessionConfig ;
14591465 use datafusion_execution:: runtime_env:: RuntimeEnvBuilder ;
14601466 use datafusion_physical_expr:: EquivalenceProperties ;
14611467 use datafusion_physical_expr:: expressions:: { Column , Literal } ;
14621468
1463- use futures:: { FutureExt , Stream } ;
1469+ use futures:: { FutureExt , Stream , TryStreamExt } ;
14641470 use insta:: assert_snapshot;
14651471
14661472 #[ derive( Debug , Clone ) ]
@@ -2759,11 +2765,6 @@ mod tests {
27592765 /// those bytes become unaccounted-for reserved memory that nobody uses.
27602766 #[ tokio:: test]
27612767 async fn test_sort_merge_reservation_transferred_not_freed ( ) -> Result < ( ) > {
2762- use datafusion_execution:: memory_pool:: {
2763- GreedyMemoryPool , MemoryConsumer , MemoryPool ,
2764- } ;
2765- use futures:: TryStreamExt ;
2766-
27672768 let sort_spill_reservation_bytes: usize = 10 * 1024 ; // 10 KB
27682769
27692770 // Pool: merge reservation (10KB) + enough room for sort to work.
@@ -2877,11 +2878,6 @@ mod tests {
28772878
28782879 #[ test]
28792880 fn test_sort_with_fetch_blocks_filter_pushdown ( ) -> Result < ( ) > {
2880- use crate :: empty:: EmptyExec ;
2881- use crate :: filter_pushdown:: { FilterPushdownPhase , PushedDown } ;
2882- use datafusion_common:: config:: ConfigOptions ;
2883- use datafusion_physical_expr:: expressions:: Column ;
2884-
28852881 let schema = Arc :: new ( Schema :: new ( vec ! [ Field :: new( "a" , DataType :: Int32 , false ) ] ) ) ;
28862882 let input = Arc :: new ( EmptyExec :: new ( Arc :: clone ( & schema) ) ) ;
28872883 let sort = SortExec :: new (
@@ -2914,11 +2910,6 @@ mod tests {
29142910
29152911 #[ test]
29162912 fn test_sort_without_fetch_allows_filter_pushdown ( ) -> Result < ( ) > {
2917- use crate :: empty:: EmptyExec ;
2918- use crate :: filter_pushdown:: { FilterPushdownPhase , PushedDown } ;
2919- use datafusion_common:: config:: ConfigOptions ;
2920- use datafusion_physical_expr:: expressions:: Column ;
2921-
29222913 let schema = Arc :: new ( Schema :: new ( vec ! [ Field :: new( "a" , DataType :: Int32 , false ) ] ) ) ;
29232914 let input = Arc :: new ( EmptyExec :: new ( Arc :: clone ( & schema) ) ) ;
29242915 let sort = SortExec :: new (
0 commit comments