Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-5999

DECIMAL literals are sometimes unparsed looking as DOUBLE literals

    XMLWordPrintableJSON

Details

    Description

      Consider a DECIMAL literal such as "0.00000000000000001"

      When unparsed this will show up as 1E-17, which is interpreted by SQL as a double literal.

      The bug is in the function SqlNumericLiteral.toValue(). The function calls toString() on a BigDecimal value, but it should probably call toPlainString() instead.

       

      Attachments

        Issue Links

          Activity

            People

              mbudiu Mihai Budiu
              mbudiu Mihai Budiu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: