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};
6969use async_trait:: async_trait;
7070use datafusion_common:: OuterQueryCursor ;
7171use datafusion_expr:: expr_fn:: binary_expr;
72+ use datafusion_expr:: WindowFrameBound ;
7273use datafusion_physical_expr:: expressions:: { any, OuterColumn } ;
7374use futures:: future:: BoxFuture ;
7475use futures:: { FutureExt , StreamExt , TryStreamExt } ;
@@ -1433,12 +1434,16 @@ pub fn create_window_expr_with_name(
14331434 ) ) ,
14341435 } )
14351436 . 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+ } ;
14421447 windows:: create_window_expr (
14431448 fun,
14441449 name,
You can’t perform that action at this time.
0 commit comments