test fo fixed issue #7798

This commit is contained in:
Artem Zuikov 2020-04-29 14:37:30 +03:00
parent de4e88ff97
commit 5fc28edb16
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1 @@
0 0000-00-00 00:00:00

View File

@ -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;