Maksim Zhuravkov created IGNITE-22421:
-----------------------------------------

             Summary: 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


DDL statements that attempt to use INTERVAL type in column definitions should 
return a proper error that informs a user that this type cannot be used in DDL.

*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.






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

Reply via email to