Mihai Budiu created CALCITE-6427:
------------------------------------

             Summary: Use a higher precision for DECIMAL intermediate results 
for some aggregate functions like STDDEV
                 Key: CALCITE-6427
                 URL: https://issues.apache.org/jira/browse/CALCITE-6427
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.37.0
            Reporter: Mihai Budiu


Today aggregates like STDDEV are expanded into computations that use 
intermediate results with the same type as the input values. Since STDDEV 
squares values, this precision may prove insufficient. For DECIMAL values a 
reasonable approach would be to use double the input precision and scale.

This is also related to [CALCITE-6322], [CALCITE-4924], [CALCITE-6324]




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to