Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-20211

`1 > 0.0001` throws Decimal scale (0) cannot be greater than precision (-2) exception

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.0.1, 2.0.2, 2.1.0, 2.1.1
    • Fix Version/s: 2.0.3, 2.1.2, 2.2.0
    • Component/s: SQL
    • Labels:

      Description

      The following SQL:

      select 1 > 0.0001 from tb
      

      throws Decimal scale (0) cannot be greater than precision (-2) exception in Spark 2.x.

      `floor(0.0001)` and `ceil(0.0001)` have the same problem in Spark 1.6.x and Spark 2.x.

        Attachments

          Activity

            People

            • Assignee:
              smilegator Xiao Li
              Reporter:
              stanzhai StanZhai
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: