pinot icon indicating copy to clipboard operation
pinot copied to clipboard

AvgPrecision aggregation function

Open anilsomisetty opened this issue 4 months ago • 1 comments

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

anilsomisetty avatar Oct 28 '25 05:10 anilsomisetty

@yashmayya I will be implementing AvgPrecision aggregation function based on our discussion in slack, could you please assign this to me ?

anilsomisetty avatar Nov 24 '25 05:11 anilsomisetty