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

Evgeny Stanilovsky resolved IGNITE-22640.
-----------------------------------------
    Resolution: Not A Problem

> Sql. Improve type derivation for dynamic parameters.
> ----------------------------------------------------
>
>                 Key: IGNITE-22640
>                 URL: https://issues.apache.org/jira/browse/IGNITE-22640
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 3.0.0-beta1
>            Reporter: Evgeny Stanilovsky
>            Priority: Major
>              Labels: ignite-3
>
> {noformat}
> sql("create table tiny(v TINYINT);");
> sql("insert into tiny values(127);");
> // passed
> assertQuery("SELECT * FROM tiny WHERE v IN 
> (?)").withParam(127).returns((byte) 127).check();
> // throw exception
> assertQuery("SELECT * FROM tiny WHERE v IN 
> (?)").withParam("127").returns((byte) 127).check();
> {noformat}
> {noformat}
> Caused by: org.apache.calcite.sql.validate.SqlValidatorException: Assignment 
> from VARCHAR to DECIMAL(32767, 16383) can not be performed. Dynamic parameter 
> requires adding explicit type cast
>       at 
> java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
> {noformat}



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

Reply via email to