Nikita Fomichev 2024-04-03 16:45:56 +02:00
parent 0cda6cf523
commit 0b53980221
2 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1 @@
2023-01-01

View File

@ -0,0 +1,23 @@
-- https://github.com/ClickHouse/ClickHouse/issues/47432
create or replace table t1
engine = MergeTree()
order by tuple()
as
select 1 as user_id, 2 as level;
create or replace table t2
engine = MergeTree()
order by tuple()
as
select 1 as user_id, 'website' as event_source, '2023-01-01 00:00:00'::DateTime as timestamp;
alter table t2
add column date Date alias toDate(timestamp);
SELECT
any(t2.date) as any_val
FROM t1 AS t1
LEFT JOIN t2 as t2
ON (t1.user_id = t2.user_id);