[
https://issues.apache.org/jira/browse/CALCITE-6560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Julian Hyde updated CALCITE-6560:
---------------------------------
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.
was:
[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
supportsNegativeScale is false and will throw an exception if set
supportsNegativeScale is true.
> Allow types with negative scale
> -------------------------------
>
> Key: CALCITE-6560
> URL: https://issues.apache.org/jira/browse/CALCITE-6560
> Project: Calcite
> Issue Type: Improvement
> Reporter: xiong duan
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.38.0
>
>
> 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.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)