[ https://issues.apache.org/jira/browse/IGNITE-18662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konstantin Orlov updated IGNITE-18662: -------------------------------------- Labels: calcite2-required ignite-3 (was: calcite2-required calcite3-required ignite-3) > Sql. Numeric to/from decimal cast with overflow does not produce an error > -------------------------------------------------------------------------- > > Key: IGNITE-18662 > URL: https://issues.apache.org/jira/browse/IGNITE-18662 > Project: Ignite > Issue Type: Bug > Components: sql > Reporter: Maksim Zhuravkov > Assignee: Evgeny Stanilovsky > Priority: Major > Labels: calcite2-required, ignite-3 > Fix For: 3.0.0-beta2 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > Casts from numeric type to decimal with overflow must fail but they return a > result: > {code:java} > SELECT 10000000::BIGINT::DECIMAL(3,1) > {code} > Returns > {code:java} > ---- > 1000000 > {code} > And the following query: > {code:java} > SELECT 2147483648::DECIMAL(18,0)::INTEGER > ---- > -2147483648 > # Integer.MIN_VALUE > {code} > {code:java} > query I > SELECT 128::DECIMAL(3,0)::TINYINT > ---- > -128 > # Byte.MIN_VALUE > {code} > See skipif-ed examples in cast_to_decimal.test and cast_from_decimal.test -- This message was sent by Atlassian Jira (v8.20.10#820010)