You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ilya Kasnacheev (JIRA)" <ji...@apache.org> on 2019/08/15 11:45:00 UTC

[jira] [Updated] (IGNITE-12075) Wrong table alias when SUM used inside CASE WHEN

     [ https://issues.apache.org/jira/browse/IGNITE-12075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Kasnacheev updated IGNITE-12075:
-------------------------------------
    Description: 
https://stackoverflow.com/questions/57472293/ignite-failed-to-run-reduce-query-locally

Consider the following queries: 

{code}
create table user (id int primary key, name varchar);
SELECT CASE WHEN id = 2016 THEN SUM(id) END FROM user GROUP BY id;
{code}

Will cause splitter to try executing wrong SQL:

{code}
Caused by: org.h2.jdbc.JdbcSQLException: Столбец "__Z0.ID" не найден
Column "__Z0.ID" not found; SQL statement:
SELECT
CASE  WHEN (__Z0.ID = 2016) THEN SUM(__C0_0) END __C0_0
FROM PUBLIC.__T0 [42122-197]
{code}

  was:
https://stackoverflow.com/questions/57472293/ignite-failed-to-run-reduce-query-locally

Consider the following queries: 

{code}
create table user (id int primary key, name varchar);
SELECT CASE WHEN id = 2016 THEN SUM(id) END FROM user GROUP BY id;
{code}

Will cause splitter to try executing wrong SQL:

```Caused by: org.h2.jdbc.JdbcSQLException: Столбец "__Z0.ID" не найден
Column "__Z0.ID" not found; SQL statement:
SELECT
CASE  WHEN (__Z0.ID = 2016) THEN SUM(__C0_0) END __C0_0
FROM PUBLIC.__T0 [42122-197]```


> Wrong table alias when SUM used inside CASE WHEN
> ------------------------------------------------
>
>                 Key: IGNITE-12075
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12075
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.7.5
>            Reporter: Ilya Kasnacheev
>            Priority: Major
>
> https://stackoverflow.com/questions/57472293/ignite-failed-to-run-reduce-query-locally
> Consider the following queries: 
> {code}
> create table user (id int primary key, name varchar);
> SELECT CASE WHEN id = 2016 THEN SUM(id) END FROM user GROUP BY id;
> {code}
> Will cause splitter to try executing wrong SQL:
> {code}
> Caused by: org.h2.jdbc.JdbcSQLException: Столбец "__Z0.ID" не найден
> Column "__Z0.ID" not found; SQL statement:
> SELECT
> CASE  WHEN (__Z0.ID = 2016) THEN SUM(__C0_0) END __C0_0
> FROM PUBLIC.__T0 [42122-197]
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)