[
https://issues.apache.org/jira/browse/IMPALA-4940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Taras Bobrovytsky resolved IMPALA-4940.
---------------------------------------
Resolution: Fixed
{code}
commit 6259641077250dcd3360e2e6c2bf9023b201d858
Author: Taras Bobrovytsky <[email protected]>
Date: Thu Jul 6 10:43:34 2017 -0700
IMPALA-4939, IMPALA-4940: Decimal V2 multiplication
Implement the new DECIMAL return type rules for multiply expressions,
active when query option DECIMAL_V2=1. The algorithm for determining
the type of the result of multiplication is described in the JIRA.
{code}
> DECIMAL V2 multiply result type
> -------------------------------
>
> Key: IMPALA-4940
> URL: https://issues.apache.org/jira/browse/IMPALA-4940
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Affects Versions: Impala 2.9.0
> Reporter: Dan Hecht
> Assignee: Taras Bobrovytsky
>
> Similar to IMPALA-4370 but for multiply. Impala's current multiply result
> type is:
> {code}
> rP = P1 + P2
> rS = S1 + S2
> If (rP > 38) then
> rP = 38
> rS = min(38, rS)
> {code}
> The proposed result type under V2 is:
> {code}
> rP = P1 + P2 + 1
> rS = S1 + S2
> // createAdjustedDecimalType()
> If (rP > 38) then
> minS = min(rS, 6)
> rS = rS - (rP - 38)
> rS = max(minS, rS)
> rP = 38
> {code}
> However, in order for this to be useful, we need to fix IMPALA-4939.
> Otherwise, we can't actually compute values that need the new result type
> anyway.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)