Pavel Pereslegin created IGNITE-22932:
-----------------------------------------
Summary: Sql. Confusing error message when casting numeric literal
larger than BIGINT
Key: IGNITE-22932
URL: https://issues.apache.org/jira/browse/IGNITE-22932
Project: Ignite
Issue Type: Bug
Components: sql
Reporter: Pavel Pereslegin
The following test
{code:java}
BigDecimal val = new BigDecimal(Long.MAX_VALUE).add(BigDecimal.ONE);
String query = format( "SELECT {}::TINYINT", val);
checkSqlError(Sql.RUNTIME_ERR, "TINYINT out of range", igniteSql(), query);
{code}
Fails with the following
{noformat}
Expected to include: "TINYINT out of range" actual: "BIGINT out of range"
{noformat}
If the value fits into BIGINT, this test passes.
p.s. fix TODO in codebase.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)