From 8d4ccb40de5a956cc412df58698176c3e9c0488c Mon Sep 17 00:00:00 2001 From: vdimir Date: Thu, 17 Jun 2021 14:20:48 +0300 Subject: [PATCH] Add test from issue #20624 --- tests/queries/0_stateless/01101_literal_column_clash.reference | 1 + tests/queries/0_stateless/01101_literal_column_clash.sql | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tests/queries/0_stateless/01101_literal_column_clash.reference b/tests/queries/0_stateless/01101_literal_column_clash.reference index e63f96416af..b89f59abb18 100644 --- a/tests/queries/0_stateless/01101_literal_column_clash.reference +++ b/tests/queries/0_stateless/01101_literal_column_clash.reference @@ -8,3 +8,4 @@ xyzabc 2 1 0 0 3 \N 1 2 \N 0 \N 1 0 \N 3 +2 1 diff --git a/tests/queries/0_stateless/01101_literal_column_clash.sql b/tests/queries/0_stateless/01101_literal_column_clash.sql index f96aad4bacf..4a6064141ea 100644 --- a/tests/queries/0_stateless/01101_literal_column_clash.sql +++ b/tests/queries/0_stateless/01101_literal_column_clash.sql @@ -20,3 +20,6 @@ select null, isConstant(null), * from (select 2 x, null) a right join (select 3 select cast(1, 'UInt8') from (select arrayJoin([1, 2]) as a) t1 left join (select 1 as b) t2 on b = ignore('UInt8'); -- { serverError 403 } select isConstant('UInt8'), toFixedString('hello', toUInt8(substring('UInt8', 5, 1))) from (select arrayJoin([1, 2]) as a) t1 left join (select 1 as b) t2 on b = ignore('UInt8'); -- { serverError 403 } + +-- https://github.com/ClickHouse/ClickHouse/issues/20624 +select 2 as `toString(x)`, x from (select 1 as x);