Ilya Kasnacheev created IGNITE-13961: ----------------------------------------
Summary: Hierarchical table join causes "Failed to generate REDUCE query. Data table found" Key: IGNITE-13961 URL: https://issues.apache.org/jira/browse/IGNITE-13961 Project: Ignite Issue Type: Bug Components: sql Affects Versions: 2.9.1, 2.8.1 Reporter: Ilya Kasnacheev {code} create table tasks (id int primary key, parent_id int); insert into tasks (id, parent_id) values (1, 1); insert into tasks (id, parent_id) values (2, 1); insert into tasks (id, parent_id) values (5, 3); insert into tasks (id, parent_id) values (7, null); SELECT * FROM (SELECT DISTINCT id, parent_id FROM tasks) AS orphan WHERE orphan.parent_id NOT IN (SELECT id FROM tasks) or orphan.parent_id is null; {code} Expected: (5, 3), (7, null) Actual: {code} Error: Failed to generate REDUCE query. Data table found: PUBLIC.TASKS SELECT ORPHAN__Z1.ID, ORPHAN__Z1.PARENT_ID FROM (SELECT DISTINCT __C0_0 ID, __C0_1 PARENT_ID FROM PUBLIC.__T0) ORPHAN__Z1 WHERE (ORPHAN__Z1.PARENT_ID IS NULL) OR (NOT (ORPHAN__Z1.PARENT_ID IN( SELECT __Z2.ID FROM PUBLIC.TASKS __Z2 ))) (state=50000,code=1) {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)