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

Casts to DECIMAL types are ignored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.36.0
    • 1.37.0
    • core

    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:
              3 Start watching this issue

              Dates

                Created:
                Updated: