Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Invalid
-
1.36.0
Description
These functions are all use the same type inference algorithm, essentially the algorithm used by AVG.
But if the values processed are decimal, STDDEV (and others) need much higher precision to represent the result. (I am not sure that the inference is right for integer types either, btw.)
This surfaced during the implementation of a fix for CALCITE-6322: if we use the type inferred for these functions, the result overflows and causes a runtime exception.
Attachments
Issue Links
- is related to
-
CALCITE-6322 Casts to DECIMAL types are ignored
- Closed
- links to