mirror of
https://github.com/apache/impala.git
synced 2026-01-03 06:00:52 -05:00
When multiplying double and decimal values, we used to cast all doubles to decimals before doing the multiplication. Due to the precision of two decimals being added during multiplication, the effective value range of the resulting decimal type could become very small and overflows could happen. This change switches the behavior to cast to double precision types when at least one of the input operands is of type float or double. In such cases we will not have exact results in general and we assume the user would normally not expect exact results from an inherently inexact datatype. Change-Id: Idd28c5471506c68a860beb0778d98c8d25825f9f Reviewed-on: http://gerrit.cloudera.org:8080/1820 Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com> Reviewed-by: Marcel Kornacker <marcel@cloudera.com> Tested-by: Internal Jenkins
2.4 KiB
2.4 KiB