From bbfd6c502c037b09902441a9631f29a736f38c10 Mon Sep 17 00:00:00 2001 From: chertus Date: Mon, 11 Feb 2019 22:33:04 +0300 Subject: [PATCH] test for issue-3998 --- dbms/tests/queries/0_stateless/00818_alias_bug_4110.reference | 2 ++ dbms/tests/queries/0_stateless/00818_alias_bug_4110.sql | 3 +++ 2 files changed, 5 insertions(+) diff --git a/dbms/tests/queries/0_stateless/00818_alias_bug_4110.reference b/dbms/tests/queries/0_stateless/00818_alias_bug_4110.reference index 204377075a9..c79c5b1fbc7 100644 --- a/dbms/tests/queries/0_stateless/00818_alias_bug_4110.reference +++ b/dbms/tests/queries/0_stateless/00818_alias_bug_4110.reference @@ -3,3 +3,5 @@ 11 11 11 12 12 11 +0 +1 diff --git a/dbms/tests/queries/0_stateless/00818_alias_bug_4110.sql b/dbms/tests/queries/0_stateless/00818_alias_bug_4110.sql index b1cfa3780a2..af62eef03ca 100644 --- a/dbms/tests/queries/0_stateless/00818_alias_bug_4110.sql +++ b/dbms/tests/queries/0_stateless/00818_alias_bug_4110.sql @@ -3,3 +3,6 @@ select s.a + 1 as a, s.a as b from (select 10 as a) s; select s.a + 1 as a, s.a + 1 as b from (select 10 as a) s; select s.a + 1 as b, s.a + 2 as a from (select 10 as a) s; select s.a + 2 as b, s.a + 1 as a from (select 10 as a) s; + +SELECT 0 as t FROM (SELECT 1 as t) as inn WHERE inn.t = 1; +SELECT sum(value) as value FROM (SELECT 1 as value) as data WHERE data.value > 0;