[
https://issues.apache.org/jira/browse/IGNITE-21827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Pavel Pereslegin updated IGNITE-21827:
--------------------------------------
Labels: calcite2-required ignite-3 (was: ignite-3)
> Sql. Union returns incorrect result for DECIMAL and INT columns
> ---------------------------------------------------------------
>
> Key: IGNITE-21827
> URL: https://issues.apache.org/jira/browse/IGNITE-21827
> Project: Ignite
> Issue Type: Bug
> Components: sql
> Reporter: Pavel Pereslegin
> Priority: Major
> Labels: calcite2-required, ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Union returns incorrect result for NUMERIC/DECIMAL and INT columns
> Simple reproducer:
> {code:java}
> sql("CREATE TABLE t0(id INT PRIMARY KEY, val INT)");
> sql("CREATE TABLE t1(id INT PRIMARY KEY, val DECIMAL)");
> sql("INSERT INTO t0 VALUES (1, 10)");
> sql("INSERT INTO t1 VALUES (1, 10)");
> assertQuery("SELECT id, val from t0 UNION select id, val from t1")
> .returns(1, new BigDecimal(10))
> .ordered()
> .check();
> {code}
> Check fails:
> {noformat}
> java.lang.AssertionError: Collections sizes are not equal:
> Expected: 1
> Actual: 2
> {noformat}
>
> The actual result for such a query contains duplicate values.
> {noformat}
> 1 10
> 1 10
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)