Description
Currently, Hive UDAFs in Spark SQL don't support partial aggregation. Any query involving any Hive UDAFs has to fall back to SortAggregateExec without partial aggregation.
This issue can be fixed by migrating HiveUDAFFunction to TypedImperativeAggregate, which already provides partial aggregation support for aggregate functions that may use arbitrary Java objects as aggregation states.