[
https://issues.apache.org/jira/browse/IGNITE-18414?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Evgeny Stanilovsky updated IGNITE-18414:
----------------------------------------
Description:
imple broken scenario looks as
{code:java}
assertQuery("SELECT typeof( ?
)").withParams(BigInteger.valueOf(1)).returns(toSqlType(NUMBER)).check();{code}
In the case we have the following error:
{code:java}
org.opentest4j.AssertionFailedError: Collections are not equal (position 0):
Expected: [NUMBER]
Actual: [RecordType()] {code}
Let's use NUMERIC SQL type for BigInteger.
I check a bit more and found strange in some cases:
1. assertQuery("SELECT UPPER(TYPEOF(? + ?))").withParams(1, 1d) : INTEGER
2. assertQuery("SELECT UPPER(TYPEOF(? + ?))").withParams(1d, 1) : DOUBLE ??? is
it ok
3. assertQuery("SELECT UPPER(TYPEOF(?::FLOAT + ?))").withParams(1, 1) : FLOAT
4. assertQuery("SELECT UPPER(TYPEOF(? + ?::DOUBLE))").withParams(1, 1d) :
DOUBLE ??? change from 1 only by cast - changes return, is it ok
5. assertQuery("SELECT UPPER(TYPEOF(?::FLOAT + ?))").withParams(1, 1d) : FLOAT
??? i expect double here.
was:
imple broken scenario looks as
{code:java}
assertQuery("SELECT typeof( ?
)").withParams(BigInteger.valueOf(1)).returns(toSqlType(NUMBER)).check();{code}
In the case we have the following error:
{code:java}
org.opentest4j.AssertionFailedError: Collections are not equal (position 0):
Expected: [NUMBER]
Actual: [RecordType()] {code}
Let's use NUMERIC SQL type for BigInteger.
> SQL. Cannot use BigInteger class as parameters for query
> --------------------------------------------------------
>
> Key: IGNITE-18414
> URL: https://issues.apache.org/jira/browse/IGNITE-18414
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Yury Gerzhedovich
> Priority: Major
> Labels: ignite-3
>
> imple broken scenario looks as
> {code:java}
> assertQuery("SELECT typeof( ?
> )").withParams(BigInteger.valueOf(1)).returns(toSqlType(NUMBER)).check();{code}
> In the case we have the following error:
> {code:java}
> org.opentest4j.AssertionFailedError: Collections are not equal (position 0):
> Expected: [NUMBER]
> Actual: [RecordType()] {code}
> Let's use NUMERIC SQL type for BigInteger.
> I check a bit more and found strange in some cases:
> 1. assertQuery("SELECT UPPER(TYPEOF(? + ?))").withParams(1, 1d) : INTEGER
> 2. assertQuery("SELECT UPPER(TYPEOF(? + ?))").withParams(1d, 1) : DOUBLE ???
> is it ok
> 3. assertQuery("SELECT UPPER(TYPEOF(?::FLOAT + ?))").withParams(1, 1) : FLOAT
> 4. assertQuery("SELECT UPPER(TYPEOF(? + ?::DOUBLE))").withParams(1, 1d) :
> DOUBLE ??? change from 1 only by cast - changes return, is it ok
> 5. assertQuery("SELECT UPPER(TYPEOF(?::FLOAT + ?))").withParams(1, 1d) :
> FLOAT ??? i expect double here.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)