You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Pereslegin (Jira)" <ji...@apache.org> on 2024/03/22 09:04:00 UTC
[jira] [Updated] (IGNITE-21827) Sql. Union returns incorrect result for DECIMAL and INT columns
[ https://issues.apache.org/jira/browse/IGNITE-21827?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pavel Pereslegin updated IGNITE-21827:
--------------------------------------
Description:
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))
.check();
{code}
The current result for such a query contains duplicate values.
{noformat}
1 10
1 10
{noformat}
was:
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))
.check();
{code}
The current output of such a query contains duplicate values.
{noformat}
1 10
1 10
{noformat}
> 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: ignite-3
>
> 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))
> .check();
> {code}
> The current 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)