File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed
datafusion/physical-plan/src/repartition Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -1595,7 +1595,6 @@ mod tests {
15951595 } ;
15961596
15971597 use arrow:: array:: { ArrayRef , StringArray , UInt32Array } ;
1598- use arrow:: compute:: sort;
15991598 use arrow:: datatypes:: { DataType , Field , Schema } ;
16001599 use datafusion_common:: cast:: as_string_array;
16011600 use datafusion_common:: exec_err;
@@ -1983,20 +1982,16 @@ mod tests {
19831982 } ) ;
19841983 let batches_with_drop = crate :: common:: collect ( output_stream1) . await . unwrap ( ) ;
19851984
1986- assert_eq ! ( 1 , batches_with_drop. len( ) ) ;
1987- assert_eq ! ( 1 , batches_without_drop. len( ) ) ;
1985+ let items_vec_with_drop = str_batches_to_vec ( & batches_with_drop) ;
1986+ let items_set_with_drop: HashSet < & str > =
1987+ items_vec_with_drop. iter ( ) . copied ( ) . collect ( ) ;
19881988
19891989 assert_eq ! (
1990- sort( batches_without_drop[ 0 ] . column( 0 ) , None )
1991- . unwrap( )
1992- . as_any( )
1993- . downcast_ref:: <StringArray >( )
1994- . unwrap( ) ,
1995- sort( batches_with_drop[ 0 ] . column( 0 ) , None )
1996- . unwrap( )
1997- . as_any( )
1998- . downcast_ref:: <StringArray >( )
1999- . unwrap( )
1990+ items_set_with_drop. symmetric_difference( & items_set) . count( ) ,
1991+ 0 ,
1992+ "items with drop {:?} and without drop {:?} are different" ,
1993+ items_set_with_drop,
1994+ items_set
20001995 ) ;
20011996 }
20021997
You can’t perform that action at this time.
0 commit comments