Ilya Kasnacheev created IGNITE-12075:
----------------------------------------
Summary: 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
https://stackoverflow.com/questions/57472293/ignite-failed-to-run-reduce-query-locallyConsider 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]```
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)