You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Evgeny Stanilovsky (Jira)" <ji...@apache.org> on 2022/12/14 11:25:00 UTC

[jira] [Created] (IGNITE-18412) Sql. Use an alias that is identical to a column name - failed.

Evgeny Stanilovsky created IGNITE-18412:
-------------------------------------------

             Summary: Sql. Use an alias that is identical to a column name - failed.
                 Key: IGNITE-18412
                 URL: https://issues.apache.org/jira/browse/IGNITE-18412
             Project: Ignite
          Issue Type: Bug
          Components: sql
    Affects Versions: 3.0.0-beta1
            Reporter: Evgeny Stanilovsky


Use an alias that is identical to a column nameĀ 

(should prioritize column name):
{noformat}
CREATE TABLE integers(i INTEGER, j INTEGER);
INSERT INTO integers VALUES (3, 4), (3, 4), (2, 4);


# use an alias that is identical to a column name (should prioritize column name)
query IR
SELECT 1 AS i, SUM(i) FROM integers GROUP BY i ORDER BY 2;
----
1  2.000000
1  6.000000{noformat}
Error:
{noformat}
[expectedRows=2, actualRows=1, expected=[[1, 2.000000], [1, 6.000000]], actual=[[1, 8]]]{noformat}
BTW PG with equivalent data returns:
{noformat}
1  2
1  6{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)