[
https://issues.apache.org/jira/browse/IGNITE-22639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Iurii Gerzhedovich updated IGNITE-22639:
----------------------------------------
Description:
We have different casts for literals and for dynamic parameters.
For example, we have a table
{code:java}
CREATE TABLE TEST(ID TINYINT PRIMARY KEY, VAL0 TINYINT){code}
For literals:
{code:java}
INSERT INTO T VALUES(100,100)
------
KeyValueModify(table=[[PUBLIC, T]], operation=[PUT],
expressions=[[CAST(100):TINYINT NOT NULL, CAST(100):TINYINT NOT NULL]]){code}
for dynamic parameters:
{code:java}
INSERT INTO T VALUES(?,?)
------
KeyValueModify(table=[[PUBLIC, T]], operation=[PUT],
expressions=[[CAST(?0):TINYINT, ?1]]): {code}
We should have the same types and casts for both cases.
See
org.apache.ignite.internal.sql.engine.planner.datatypes.DmlSourcesCoercionTest.
During fix the issue let's also add additional test with dynamic parameters for
all child of BaseTypeCoercionTest class.
was:
We have different casts for literals and for dynamic parameters.
For example, we have a table
{code:java}
CREATE TABLE TEST(ID TINYINT PRIMARY KEY, VAL0 TINYINT){code}
For literals:
{code:java}
INSERT INTO T VALUES(100,100)
------
KeyValueModify(table=[[PUBLIC, T]], operation=[PUT],
expressions=[[CAST(100):TINYINT NOT NULL, CAST(100):TINYINT NOT NULL]]){code}
for dynamic parameters:
{code:java}
INSERT INTO T VALUES(?,?)
------
KeyValueModify(table=[[PUBLIC, T]], operation=[PUT],
expressions=[[CAST(?0):TINYINT, ?1]]): {code}
We must have the same
See
org.apache.ignite.internal.sql.engine.planner.datatypes.DmlSourcesCoercionTest.
During fix the issue let's also add additional test with dynamic parameters for
all child of BaseTypeCoercionTest class.
> Sql. Different casts for literals and for dynamic parameters
> ------------------------------------------------------------
>
> Key: IGNITE-22639
> URL: https://issues.apache.org/jira/browse/IGNITE-22639
> Project: Ignite
> Issue Type: Improvement
> Components: sql
> Reporter: Iurii Gerzhedovich
> Priority: Major
> Labels: ignite-3
>
> We have different casts for literals and for dynamic parameters.
> For example, we have a table
> {code:java}
> CREATE TABLE TEST(ID TINYINT PRIMARY KEY, VAL0 TINYINT){code}
> For literals:
> {code:java}
> INSERT INTO T VALUES(100,100)
> ------
> KeyValueModify(table=[[PUBLIC, T]], operation=[PUT],
> expressions=[[CAST(100):TINYINT NOT NULL, CAST(100):TINYINT NOT NULL]]){code}
> for dynamic parameters:
> {code:java}
> INSERT INTO T VALUES(?,?)
> ------
> KeyValueModify(table=[[PUBLIC, T]], operation=[PUT],
> expressions=[[CAST(?0):TINYINT, ?1]]): {code}
> We should have the same types and casts for both cases.
> See
> org.apache.ignite.internal.sql.engine.planner.datatypes.DmlSourcesCoercionTest.
> During fix the issue let's also add additional test with dynamic parameters
> for all child of BaseTypeCoercionTest class.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)