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

An incorrect specification of a Decimal datatype should spit out a meaningful error message.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • Impala 1.4
    • None
    • Frontend

    Description

      Proper Error:

      [localhost:21000] > select cast(0.1 as Decimal(2,3));
      Query: select cast(0.1 as Decimal(2,3))
      ERROR: AnalysisException: Decimal scale (3) must be <= precision (2).
      

      However, this is not consistently applied:

      [localhost:21000] > select cast(0.1 as Decimal(2,-2));
      Query: select cast(0.1 as Decimal(2,-2))
      ERROR: AnalysisException: Syntax error in line 1:
      select cast(0.1 as Decimal(2,-2))
                                   ^
      Encountered: -
      Expected
      
      CAUSED BY: Exception: Syntax error
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            ishaan Ishaan Joshi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: