AvgPrecision aggregation function
Currently, when performing sum or avg on a BIG_DECIMAL column, the result is returned as double, even though the source data is of BIG_DECIMAL type. This leads to the output being displayed in exponential format after a certain precision.
While there is a sumprecision function available for sum to maintain big decimal output, there is no equivalent function for avg to return the result as big decimal instead of double.
In Trino/Presto the output of aggregate functions is as expected without exponential format.
Example: input: 1234567890.1234567 output: 1.2345678901234567E9 expected output: 1234567890.1234567
@yashmayya I will be implementing AvgPrecision aggregation function based on our discussion in slack, could you please assign this to me ?