You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Yury Gerzhedovich (Jira)" <ji...@apache.org> on 2023/02/14 08:03:00 UTC

[jira] [Updated] (IGNITE-18789) Sql. The sign of the default values for precision and scale is not kept

     [ https://issues.apache.org/jira/browse/IGNITE-18789?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Yury Gerzhedovich updated IGNITE-18789:
---------------------------------------
    Description: 
SQL standard says:
{code:java}
If <precision> or <scale> is not specified explicitly, then the corresponding element of the descriptor effectively contains the null value.{code}

But we keep our default values. That led to at least a few issues:
1) metadata will return incorrect information. For example type DECIMAL will be returned as DECIMAL(32767, 0)
2) The same issue will be for TYPEOF function for DECIMAL column will be returned DECIMAL(32767, 0)

To fix the issue we should amend restrictions for configurations that are currently are not allowed to keep negative values and keep as special values sign default precision and/or scale, or do the properties like a nullable.

  was:
SQL standard says:
If <precision> or <scale> is not specified explicitly, then the corresponding element of the descriptor effectively contains the null value.
But we keep our default values. That led to at least a few issues:
1) metadata will return incorrect information. For example type DECIMAL will be returned as DECIMAL(32767, 0)
2) The same issue will be for TYPEOF function for DECIMAL column will be returned DECIMAL(32767, 0)


To fix the issue we should amend restrictions for configurations that are currently are not allowed to keep negative values and keep as special values sign default precision and/or scale, or do the properties like a nullable.


> Sql. The sign of the default values for precision and scale is not kept
> -----------------------------------------------------------------------
>
>                 Key: IGNITE-18789
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18789
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Yury Gerzhedovich
>            Priority: Major
>
> SQL standard says:
> {code:java}
> If <precision> or <scale> is not specified explicitly, then the corresponding element of the descriptor effectively contains the null value.{code}
> But we keep our default values. That led to at least a few issues:
> 1) metadata will return incorrect information. For example type DECIMAL will be returned as DECIMAL(32767, 0)
> 2) The same issue will be for TYPEOF function for DECIMAL column will be returned DECIMAL(32767, 0)
> To fix the issue we should amend restrictions for configurations that are currently are not allowed to keep negative values and keep as special values sign default precision and/or scale, or do the properties like a nullable.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)