Evgeny Stanilovsky created IGNITE-20849:
-------------------------------------------
Summary: Sql. Incorrect result returns from CAST as DECIMAL
Key: IGNITE-20849
URL: https://issues.apache.org/jira/browse/IGNITE-20849
Project: Ignite
Issue Type: Bug
Components: sql
Affects Versions: 3.0.0-beta1
Reporter: Evgeny Stanilovsky
After [1] will be merged, additional case need to be fixed:
{code:java}
@Test
public void test0() {
List<List<Object>> res = sql("SElECT a::BIGINT FROM \n"
+ "(SELECT '111111111111111111111111111111111'::DECIMAL as a) t(a)");
System.err.println("!!!: " + res);
}
return: 4553682020284002759{code}
The problem is :
IgniteSqlValidator#literalCanFitType filter only
INT_TYPES for now, seems need to be changed into NUMERIC_TYPES, after this
change additional problem rised in min, max bound definition :
org.apache.calcite.sql.type.SqlTypeName#getLimit - it works incorrect, need to
be fixed
[1] https://issues.apache.org/jira/browse/IGNITE-18662
--
This message was sent by Atlassian Jira
(v8.20.10#820010)