File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -307,12 +307,16 @@ impl DataFrame {
307307 let df = self . clone ( ) ;
308308 let mut aggr_expr: Vec < Expr > = vec ! [ ] ;
309309 aggr_expr. push ( datafusion_expr:: count ( col ( field. name ( ) ) ) ) ;
310+ let mut rs = vec ! [ ] ;
310311 match field. data_type ( ) . is_numeric ( ) {
311312 true => {
312313 aggr_expr. push ( datafusion_expr:: min ( col ( field. name ( ) ) ) ) ;
313314 aggr_expr. push ( datafusion_expr:: max ( col ( field. name ( ) ) ) ) ;
314315 }
315- false => { }
316+ false => {
317+ rs. push ( "null" . to_string ( ) ) ;
318+ rs. push ( "null" . to_string ( ) ) ;
319+ }
316320 }
317321
318322 let df = df
@@ -322,15 +326,7 @@ impl DataFrame {
322326 . await
323327 . unwrap ( ) ;
324328
325- let mut rs = vec ! [ ] ;
326329 for batch in df {
327- match batch. num_columns ( ) {
328- 1 => {
329- rs. push ( "null" . to_string ( ) ) ;
330- rs. push ( "null" . to_string ( ) ) ;
331- }
332- _ => { }
333- }
334330 for col in 0 ..batch. num_columns ( ) {
335331 let column = batch. column ( col) ;
336332 let val = array_value_to_string ( column, 0 ) . unwrap ( ) ;
You can’t perform that action at this time.
0 commit comments