[
https://issues.apache.org/jira/browse/IGNITE-19877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Evgeny Stanilovsky updated IGNITE-19877:
----------------------------------------
Description:
{code:java}
@Test
public void test0() {
String query = format("SELECT CAST(? AS DECIMAL(5, 1))");
assertQuery(query).withParams(LocalTime.now()).returns(2).ok();
}
{code}
Throws Numeric overflow exception, seems this is incorrect behavior.
Seems scope of this issue is to check casting of:
1. not supported objects
2. IgniteCustomType
full casting matrix need to be fixed in scope of [1]
[1] https://issues.apache.org/jira/browse/IGNITE-20069
was:
{code:java}
@Test
public void test0() \{
String query = format("SELECT CAST(? AS DECIMAL(5, 1))");
sql(query).withParams(LocalTime.now()).returns(2).ok();
}
{code}
Throws Numeric overflow exception, seems this is incorrect behavior.
> Sql. Erroneous cast possibility Custom object to Numeric.
> ---------------------------------------------------------
>
> Key: IGNITE-19877
> URL: https://issues.apache.org/jira/browse/IGNITE-19877
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Affects Versions: 3.0.0-beta1
> Reporter: Evgeny Stanilovsky
> Assignee: Evgeny Stanilovsky
> Priority: Major
> Labels: ignite-3
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> {code:java}
> @Test
> public void test0() {
> String query = format("SELECT CAST(? AS DECIMAL(5, 1))");
> assertQuery(query).withParams(LocalTime.now()).returns(2).ok();
> }
> {code}
> Throws Numeric overflow exception, seems this is incorrect behavior.
> Seems scope of this issue is to check casting of:
> 1. not supported objects
> 2. IgniteCustomType
> full casting matrix need to be fixed in scope of [1]
> [1] https://issues.apache.org/jira/browse/IGNITE-20069
--
This message was sent by Atlassian Jira
(v8.20.10#820010)