mhilton commented on code in PR #25886:
URL: https://github.com/apache/datafusion/pull/25886#discussion_r4153237271


##########
datafusion/functions-aggregate-common/src/aggregate/groups_accumulator.rs:
##########
@@ -771,6 +865,30 @@ fn get_filter_at_indices(
         .map_err(|e| arrow_datafusion_err!(e))
 }
 
+fn filtered_row_count(opt_filter: Option<&BooleanArray>, offsets: &[usize]) -> 
usize {
+    let (offset, length) = (offsets[0], offsets[1] - offsets[0]);
+    opt_filter.map_or(length, |filter| {
+        filter
+            .slice(offset, length)
+            .iter()

Review Comment:
   I wonder if using 
[`true_count()`](https://docs.rs/arrow/60.0.0/arrow/array/struct.BooleanArray.html#method.true_count)
 would be mildly speedier here.



##########
datafusion/physical-plan/src/windows/mod.rs:
##########
@@ -103,6 +103,12 @@ pub fn create_window_expr(
 ) -> Result<Arc<dyn WindowExpr>> {
     Ok(match fun {
         WindowFunctionDefinition::AggregateUDF(fun) => {
+            if args.is_empty() {
+                return not_impl_err!(
+                    "Aggregate window function {} without arguments is not 
supported",

Review Comment:
   I suppose this does technically invalidate 
https://datafusion.apache.org/user-guide/sql/window_functions.html#aggregate-functions.
 I'm not sure that is enough to require making this work in this PR though.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to