mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
commit
27594ff870
@ -0,0 +1 @@
|
||||
0 0000-00-00 00:00:00
|
@ -0,0 +1,21 @@
|
||||
DROP DICTIONARY IF EXISTS system.dict1;
|
||||
|
||||
CREATE DICTIONARY IF NOT EXISTS system.dict1
|
||||
(
|
||||
bytes_allocated UInt64,
|
||||
element_count Int32,
|
||||
loading_start_time DateTime
|
||||
)
|
||||
PRIMARY KEY bytes_allocated
|
||||
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' PASSWORD '' TABLE 'dictionaries' DB 'system'))
|
||||
LIFETIME(0)
|
||||
LAYOUT(hashed());
|
||||
|
||||
SELECT dictGetInt32('system.dict1', 'element_count', toUInt64(dict_key)) AS join_key,
|
||||
dictGetDateTime('system.dict1', 'loading_start_time', toUInt64(dict_key)) AS datetime
|
||||
FROM (select 1 AS dict_key) js1
|
||||
LEFT JOIN (SELECT toInt32(2) AS join_key) js2
|
||||
USING (join_key)
|
||||
WHERE now() >= datetime;
|
||||
|
||||
DROP DICTIONARY IF EXISTS system.dict1;
|
Loading…
Reference in New Issue
Block a user