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

Casts to DECIMAL types are ignored

    XMLWordPrintableJSON

Details

    Description

      The following SqlOperatorTest fails:

      f.checkScalar("CAST(1.123 AS DECIMAL(4, 0))", "1.0", "DECIMAL(4, 0) NOT NULL");
      

      The result computed by Calcite is 1.123, ignoring the scale of the DECIMAL result.
      Spark, Postgres, MySQL all return 1.0.

      I have marked this as a major bug.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: