@@ -2031,7 +2031,8 @@ impl Window {
2031
2031
let fields = input. schema ( ) . fields ( ) ;
2032
2032
let input_len = fields. len ( ) ;
2033
2033
let mut window_fields = fields. clone ( ) ;
2034
- window_fields. extend_from_slice ( & exprlist_to_fields ( window_expr. iter ( ) , & input) ?) ;
2034
+ let expr_fields = exprlist_to_fields ( window_expr. as_slice ( ) , & input) ?;
2035
+ window_fields. extend_from_slice ( expr_fields. as_slice ( ) ) ;
2035
2036
let metadata = input. schema ( ) . metadata ( ) . clone ( ) ;
2036
2037
2037
2038
// Update functional dependencies for window:
@@ -2357,7 +2358,7 @@ impl DistinctOn {
2357
2358
let on_expr = normalize_cols ( on_expr, input. as_ref ( ) ) ?;
2358
2359
2359
2360
let schema = DFSchema :: new_with_metadata (
2360
- exprlist_to_fields ( & select_expr, & input) ?,
2361
+ exprlist_to_fields ( select_expr. as_slice ( ) , & input) ?,
2361
2362
input. schema ( ) . metadata ( ) . clone ( ) ,
2362
2363
) ?;
2363
2364
@@ -2436,7 +2437,7 @@ impl Aggregate {
2436
2437
2437
2438
let grouping_expr: Vec < Expr > = grouping_set_to_exprlist ( group_expr. as_slice ( ) ) ?;
2438
2439
2439
- let mut fields = exprlist_to_fields ( grouping_expr. iter ( ) , & input) ?;
2440
+ let mut fields = exprlist_to_fields ( grouping_expr. as_slice ( ) , & input) ?;
2440
2441
2441
2442
// Even columns that cannot be null will become nullable when used in a grouping set.
2442
2443
if is_grouping_set {
@@ -2446,7 +2447,7 @@ impl Aggregate {
2446
2447
. collect :: < Vec < _ > > ( ) ;
2447
2448
}
2448
2449
2449
- fields. extend ( exprlist_to_fields ( aggr_expr. iter ( ) , & input) ?) ;
2450
+ fields. extend ( exprlist_to_fields ( aggr_expr. as_slice ( ) , & input) ?) ;
2450
2451
2451
2452
let schema =
2452
2453
DFSchema :: new_with_metadata ( fields, input. schema ( ) . metadata ( ) . clone ( ) ) ?;
0 commit comments