Commits

Neal Richardson authored 3db4854b4c4
ARROW-13778: [R] Handle complex summarize expressions This handles `summarize()` queries like `avg = sum(x) / n()` by extracting the aggregations and evaluating them first, then implicitly doing `mutate()` afterwards. It does not support things like `stddev = sqrt(sum((x - mean(x)) ^ 2) / n())` because `x - mean(x)` implies a grouped aggregation -> left join -> mutate; that will be ARROW-13926 (after we can do joins). TODO: - [x] More testing and better error handling for unsupported cases - [x] Add more explanatory discussion in comments because the logic gets complex Closes #11108 from nealrichardson/complex-exprs Authored-by: Neal Richardson <neal.p.richardson@gmail.com> Signed-off-by: Neal Richardson <neal.p.richardson@gmail.com>