File tree 2 files changed +9
-8
lines changed
2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -548,9 +548,11 @@ def _ibis_window_from_spec(self, window_spec: WindowSpec):
548
548
window_spec .ordering ,
549
549
)
550
550
else :
551
- order_by = _convert_range_ordering_to_table_value (
552
- self ._column_names , window_spec .ordering [0 ]
553
- )
551
+ order_by = [
552
+ _convert_range_ordering_to_table_value (
553
+ self ._column_names , window_spec .ordering [0 ]
554
+ )
555
+ ]
554
556
555
557
window = bigframes_vendored .ibis .window (order_by = order_by , group_by = group_by )
556
558
if window_spec .bounds is not None :
@@ -611,8 +613,8 @@ def _convert_range_ordering_to_table_value(
611
613
)
612
614
613
615
if ordering_column .direction .is_ascending :
614
- return bigframes_vendored .ibis .asc (expr )
615
- return bigframes_vendored .ibis .desc (expr )
616
+ return bigframes_vendored .ibis .asc (expr ) # type: ignore
617
+ return bigframes_vendored .ibis .desc (expr ) # type: ignore
616
618
617
619
618
620
def _string_cast_join_cond (
Original file line number Diff line number Diff line change @@ -360,6 +360,7 @@ def compile_window(self, node: nodes.WindowOpNode):
360
360
return df .with_columns ([agg_expr ])
361
361
362
362
else : # row-bounded window
363
+ assert isinstance (window .bounds , window_spec .RowsWindowBounds )
363
364
# Polars API semi-bounded, and any grouped rolling window challenging
364
365
# https://github.com/pola-rs/polars/issues/4799
365
366
# https://github.com/pola-rs/polars/issues/8976
@@ -383,9 +384,7 @@ def compile_window(self, node: nodes.WindowOpNode):
383
384
return pl .concat ([df , results ], how = "horizontal" )
384
385
385
386
386
- def _get_period (
387
- bounds : Union [window_spec .RowsWindowBounds , window_spec .RangeWindowBounds ]
388
- ) -> Optional [int ]:
387
+ def _get_period (bounds : window_spec .RowsWindowBounds ) -> Optional [int ]:
389
388
"""Returns None if the boundary is infinite."""
390
389
if bounds .start is None or bounds .end is None :
391
390
return None
You can’t perform that action at this time.
0 commit comments