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

Floating point literals produce incorrect SQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4.4
    • 3.0.0
    • SQL
    • None

    Description

      A FLOAT literal 1.2345 returns SQL `CAST(1.2345 AS FLOAT)`. For very small values this doesn't work; `CAST(1e-44 AS FLOAT)` for example doesn't parse, because the parser tries to squeeze the numeric literal 1e-44 into a DECIMAL(38).

      Attachments

        Issue Links

          Activity

            People

              joseph.torres Jose Torres
              joseph.torres Jose Torres
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: