You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maksim Zhuravkov (Jira)" <ji...@apache.org> on 2024/06/06 08:54:00 UTC

[jira] [Updated] (IGNITE-22421) Sql. Interval type. DDL statements should return a proper error

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

Maksim Zhuravkov updated IGNITE-22421:
--------------------------------------
    Description: 
DDL statements that use INTERVAL type in column definitions return the following errors:

*Current behaviour*

{noformat}
CREATE TABLE t (a INTERVAL MONTH, b INT, PRIMARY KEY(a))
Err: Precision definition is necessary for column 'A' of type 'PERIOD'

CREATE TABLE t (a INTERVAL SECOND, b INT, PRIMARY KEY(a))
Err:  Scale is not applicable for column 'A' of type 'DURATION'

ALTER TABLE t ADD COLUMN c INTERVAL YEAR TO MONTH
Precision definition is necessary for column 'C' of type 'PERIOD'
{noformat}

*Expected behaviour*

Both statements should return an error that clearly indicates that INTERVAL types cannot be used in this context.




  was:
DDL statements that use INTERVAL type in column definitions return the following errors:

*Current behaviour*

{noformat}
CREATE TABLE t (a INTERVAL MONTH, b INT, PRIMARY KEY(a))
Err: Precision definition is necessary for column 'A' of type 'PERIOD'

CREATE TABLE t (a INTERVAL SECOND, b INT, PRIMARY KEY(a))
Err:  Scale is not applicable for column 'A' of type 'DURATION'

ALTER TABLE t ADD COLUMN c INTERVAL YEAR TO MONTH
Precision definition is necessary for column 'C' of type 'PERIOD'
{noformat}

*Expected behaviour*

Both statements should return an error that clearly indicates that INTERVAL types cannot be  in this context.





> Sql. Interval type. DDL statements should return a proper error
> ---------------------------------------------------------------
>
>                 Key: IGNITE-22421
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22421
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Maksim Zhuravkov
>            Priority: Minor
>              Labels: ignite-3
>
> DDL statements that use INTERVAL type in column definitions return the following errors:
> *Current behaviour*
> {noformat}
> CREATE TABLE t (a INTERVAL MONTH, b INT, PRIMARY KEY(a))
> Err: Precision definition is necessary for column 'A' of type 'PERIOD'
> CREATE TABLE t (a INTERVAL SECOND, b INT, PRIMARY KEY(a))
> Err:  Scale is not applicable for column 'A' of type 'DURATION'
> ALTER TABLE t ADD COLUMN c INTERVAL YEAR TO MONTH
> Precision definition is necessary for column 'C' of type 'PERIOD'
> {noformat}
> *Expected behaviour*
> Both statements should return an error that clearly indicates that INTERVAL types cannot be used in this context.



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