Spark's analyzer only wraps AggregateFunctions in AggregateExpressions immediately after
resolution. Since AggregateByIndex is first resolved as a higher order function, it is
not correctly wrapped. Note that it's merely a coincidence that it is first resolved as a higher
order function.
This rule is needed by AggregateByIndex.
Spark's analyzer only wraps AggregateFunctions in AggregateExpressions immediately after resolution. Since AggregateByIndex is first resolved as a higher order function, it is not correctly wrapped. Note that it's merely a coincidence that it is first resolved as a higher order function.