File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
datafusion/core/src/physical_plan Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ use arrow::{compute::can_cast_types, datatypes::DataType};
69
69
use async_trait:: async_trait;
70
70
use datafusion_common:: OuterQueryCursor ;
71
71
use datafusion_expr:: expr_fn:: binary_expr;
72
+ use datafusion_expr:: WindowFrameBound ;
72
73
use datafusion_physical_expr:: expressions:: { any, OuterColumn } ;
73
74
use futures:: future:: BoxFuture ;
74
75
use futures:: { FutureExt , StreamExt , TryStreamExt } ;
@@ -1433,12 +1434,16 @@ pub fn create_window_expr_with_name(
1433
1434
) ) ,
1434
1435
} )
1435
1436
. collect :: < Result < Vec < _ > > > ( ) ?;
1436
- if window_frame. is_some ( ) {
1437
- return Err ( DataFusionError :: NotImplemented (
1438
- "window expression with window frame definition is not yet supported"
1439
- . to_owned ( ) ,
1440
- ) ) ;
1441
- }
1437
+ let window_frame = match window_frame {
1438
+ Some ( window_frame) => match ( & window_frame. start_bound , & window_frame. end_bound ) {
1439
+ ( WindowFrameBound :: Preceding ( None ) , WindowFrameBound :: CurrentRow ) => & None ,
1440
+ ( _, _) => return Err ( DataFusionError :: NotImplemented (
1441
+ "window expression with window frame definition is not yet supported"
1442
+ . to_owned ( ) ,
1443
+ ) ) ,
1444
+ } ,
1445
+ None => & None ,
1446
+ } ;
1442
1447
windows:: create_window_expr (
1443
1448
fun,
1444
1449
name,
You can’t perform that action at this time.
0 commit comments