File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
third_party/bigframes_vendored/ibis/expr/types Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -474,8 +474,9 @@ def project_window_op(
474474 else :
475475 # Operations like count treat even NULLs as valid observations for the sake of min_periods
476476 # notnull is just used to convert null values to non-null (FALSE) values to be counted
477+ is_observation = ops .notnull_op .as_expr (expression .inputs [0 ])
477478 observation_count_expr = agg_expressions .WindowExpression (
478- agg_ops .size_op .as_expr (),
479+ agg_ops .count_op .as_expr (is_observation ),
479480 window_spec ,
480481 )
481482 clauses .append (
Original file line number Diff line number Diff line change @@ -773,7 +773,9 @@ def over(
773773
774774 @deferrable
775775 def bind (table ):
776- winfunc = rewrite_window_input (node , window .bind (table ))
776+ winfunc = rewrite_window_input (
777+ node , window .bind (table ) if table else window
778+ )
777779 if winfunc == node :
778780 raise com .IbisTypeError (
779781 "No reduction or analytic function found to construct a window expression"
@@ -782,7 +784,7 @@ def bind(table):
782784
783785 try :
784786 return bind (table )
785- except com .IbisInputError :
787+ except com .IbisInputError as e :
786788 return bind (_ )
787789
788790 def isnull (self ) -> ir .BooleanValue :
You can’t perform that action at this time.
0 commit comments