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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • Impala 2.10.0
    • Backend
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: