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

Maksim Zhuravkov updated IGNITE-22312:
--------------------------------------
    Description: 
1. SqlValidator accepts values for precision / scale that lay beyond max 
precision / scale values defined by IgniteTypeSystem:

{noformat}
SELECT '12:34:54'::TIME(1000)
SELECT '111' :: DECIMAL(2147483647)
{noformat}

2. Error messages produced by Catalog and SqlValidator are inconsistent:

{noformat}
ALTER TABLE t ADD COLUMN valint3 varchar(0)
Error: Length for column 'VALINT3' of type 'STRING' must be at least 1

SELECT 1::VARCHAR(0)
Error: Length for type 'VARCHAR' must be at least 1
{noformat}




  was:
1. SqlValidator accept values for precision / scale that lay beyond max 
precision / scale values defined by IgniteTypeSystem.
2. Error messages produced by Catalog and SqlValidator are inconsistent:

{noformat}
ALTER TABLE t ADD COLUMN valint3 varchar(0)
Error: Length for column 'VALINT3' of type 'STRING' must be at least 1

SELECT 1::VARCHAR(0)
Error: Length for type 'VARCHAR' must be at least 1
{noformat}





> Sql. Type parameters such precision / scale / length are not properly checked.
> ------------------------------------------------------------------------------
>
>                 Key: IGNITE-22312
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22312
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>            Reporter: Maksim Zhuravkov
>            Priority: Critical
>              Labels: ignite-3
>
> 1. SqlValidator accepts values for precision / scale that lay beyond max 
> precision / scale values defined by IgniteTypeSystem:
> {noformat}
> SELECT '12:34:54'::TIME(1000)
> SELECT '111' :: DECIMAL(2147483647)
> {noformat}
> 2. Error messages produced by Catalog and SqlValidator are inconsistent:
> {noformat}
> ALTER TABLE t ADD COLUMN valint3 varchar(0)
> Error: Length for column 'VALINT3' of type 'STRING' must be at least 1
> SELECT 1::VARCHAR(0)
> Error: Length for type 'VARCHAR' must be at least 1
> {noformat}



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

Reply via email to