andygrove commented on PR #16234: URL: https://github.com/apache/datafusion/pull/16234#issuecomment-2949909716
> @alamb I'm sorry for the issue that occurred. After a preliminary review, I suspect the cause might be: > > ``` > diff --git a/datafusion/physical-expr/src/window/window_expr.rs b/datafusion/physical-expr/src/window/window_expr.rs > index 70a73c44a..8c9cb90b9 100644 > --- a/datafusion/physical-expr/src/window/window_expr.rs > +++ b/datafusion/physical-expr/src/window/window_expr.rs > @@ -276,11 +276,12 @@ pub trait AggregateWindowExpr: WindowExpr { > not_end: bool, > ) -> Result<ArrayRef> { > let values = self.evaluate_args(record_batch)?; > + let length = values[0].len(); > > if self.is_constant_in_partition() { > accumulator.update_batch(&values)?; > let value = accumulator.evaluate()?; > - return value.to_array_of_size(record_batch.num_rows()); > + return value.to_array_of_size(length - idx); > } > let order_bys = get_orderby_values(self.order_by_columns(record_batch)?); > let most_recent_row_order_bys = most_recent_row > @@ -289,7 +290,6 @@ pub trait AggregateWindowExpr: WindowExpr { > .map(get_orderby_values); > > // We iterate on each row to perform a running calculation. > - let length = values[0].len(); > let mut row_wise_results: Vec<ScalarValue> = vec![]; > let is_causal = self.get_window_frame().is_causal(); > while idx < length { > ``` > > @andygrove Could you please help me confirm this? Thanks! Sure, trying this now! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org