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

Evgeny Stanilovsky updated IGNITE-20069:
----------------------------------------
    Description: 
Erroneous casts for dynamic params are fixed in [1] but it still possible to 
execute not allowed cast against strictly defined values.
Such kind of tests need to be failed:


{noformat}
       
        sql("SELECT CAST(timestamp '1992-09-26 02:30:00' AS 
tinyint)").ok().getExecutable().execute();
{noformat}

Probably root case is here : 
org.apache.calcite.sql.fun.SqlCastFunction#checkOperandTypes, need additional 
investigation.

Appropriate checks for dynamic parameters was implemented in  [1]

[1] https://issues.apache.org/jira/browse/IGNITE-19877

  was:
Erroneous casts for dynamic params are fixed in [1] but it still possible to 
execute not allowed cast against strictly defined values.
Such kind of tests need to be failed:


{noformat}
        sql("SELECT CAST('466e2e87-47fe-4849-9ef5-c40d0ee6da50' AS 
tinyint)").ok().getExecutable().execute();
        sql("SELECT CAST(timestamp '1992-09-26 02:30:00' AS 
tinyint)").ok().getExecutable().execute();
{noformat}

Probably root case is here : 
org.apache.calcite.sql.fun.SqlCastFunction#checkOperandTypes, need additional 
investigation.

Also need to be unmuted tests from [1]

[1] https://issues.apache.org/jira/browse/IGNITE-19877


> Sql. Not allowed conversion in CAST is possible.
> ------------------------------------------------
>
>                 Key: IGNITE-20069
>                 URL: https://issues.apache.org/jira/browse/IGNITE-20069
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>    Affects Versions: 3.0.0-beta1
>            Reporter: Evgeny Stanilovsky
>            Priority: Major
>              Labels: ignite-3
>
> Erroneous casts for dynamic params are fixed in [1] but it still possible to 
> execute not allowed cast against strictly defined values.
> Such kind of tests need to be failed:
> {noformat}
>        
>         sql("SELECT CAST(timestamp '1992-09-26 02:30:00' AS 
> tinyint)").ok().getExecutable().execute();
> {noformat}
> Probably root case is here : 
> org.apache.calcite.sql.fun.SqlCastFunction#checkOperandTypes, need additional 
> investigation.
> Appropriate checks for dynamic parameters was implemented in  [1]
> [1] https://issues.apache.org/jira/browse/IGNITE-19877



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

Reply via email to