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

Allow types with negative scale

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.38.0
    • None

    Description

      In interface RelDataTypeSystem, add methods getMinScale(SqlTypeName) and getDefaultScale(SqlTypeName); if getMinScale returns a negative value for the DECIMAL type, the type system will allow DECIMAL values with negative scale.

      https://www.postgresql.org/docs/current/datatype-numeric.html

      According to the document, a numeric column with a negative scale can be declared beginning in PostgreSQL 15. This PR will add some tests to cover getMinScale is non-negative and will throw an exception if set getMinScale is negative.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              nobigo xiong duan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: