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

Converting a string decimal with a large negative exponent causes a crash

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Impala 2.10.0
    • Component/s: Backend
    • Labels:
      None
    • Epic Color:
      ghx-label-1

      Description

      The following query causes a crash:

      select cast("1.234e-30" as decimal(10, 2))
      

      We hit a DCHECK:

      string-parser.h:221] Check failed: value >= 0
      

      One a release build, the result is incorrect:

      +------------------------------------+
      | cast('1.234e-30' as decimal(10,2)) |
      +------------------------------------+
      | -12.34                             |
      +------------------------------------+
      

        Attachments

          Activity

            People

            • Assignee:
              tarasbob Taras Bobrovytsky
              Reporter:
              tarasbob Taras Bobrovytsky
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: