[ 
https://issues.apache.org/jira/browse/CALCITE-4959?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17465070#comment-17465070
 ] 

Julian Hyde commented on CALCITE-4959:
--------------------------------------

Looks like I added the
{code:java}
final int maxPrecision = typeSystem.getMaxPrecision(typeName);
if (maxPrecision >= 0 && precision > maxPrecision) {
  precision = maxPrecision;
} {code}
logic in CALCITE-1690. Would this change break that?

Maybe we could add a 'strict' mode where precision and scale have to be within 
range, and are not implicitly rounded down to the range. We'd need SQL 
validation tests.

> Throw a error when precision is greater than maxPrecision
> ---------------------------------------------------------
>
>                 Key: CALCITE-4959
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4959
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.28.0
>            Reporter: Ada Wong
>            Priority: Major
>
> Could we throw a error when precision > maxPrecision in 
> SqlTypeFactoryImpl#createSqlType. Instead of force override.
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to