Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-4940

DECIMAL V2 multiply result type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Impala 2.9.0
    • Impala 2.11.0
    • Frontend
    • None

    Description

      Similar to IMPALA-4370 but for multiply. Impala's current multiply result type is:

      rP = P1 + P2
      rS = S1 + S2
      If (rP > 38) then
         rP = 38
         rS = min(38, rS)
      

      The proposed result type under V2 is:

      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
      

      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.

      Attachments

        Issue Links

          Activity

            People

              tarasbob Taras Bobrovytsky
              dhecht Daniel Hecht
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: