mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
More tests
This commit is contained in:
parent
d99c26a40c
commit
7634092536
@ -7,3 +7,33 @@
|
||||
0
|
||||
0
|
||||
0
|
||||
[11,22]
|
||||
[22,11]
|
||||
[11,22]
|
||||
[22,11]
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
[11,22]
|
||||
[22,11]
|
||||
[11,22]
|
||||
[22,11]
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
1
|
||||
255
|
||||
255
|
||||
0
|
||||
255
|
||||
[11,22]
|
||||
[22,11]
|
||||
[11,22]
|
||||
[22,11]
|
||||
|
@ -28,6 +28,70 @@ SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUIn
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(11), materialize(toUInt64(222)));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)), materialize(toUInt64(111)));
|
||||
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', toUInt64(11));
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', toUInt64(22));
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(11)));
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)));
|
||||
|
||||
|
||||
DROP DICTIONARY IF EXISTS database_for_dict.dictionary_with_hierarchy;
|
||||
|
||||
CREATE DICTIONARY database_for_dict.dictionary_with_hierarchy
|
||||
(
|
||||
id UInt64, parent_id UInt64 HIERARCHICAL, value String
|
||||
)
|
||||
PRIMARY KEY id
|
||||
SOURCE(CLICKHOUSE(host 'localhost' port 9000 user 'default' table 'dict_source'))
|
||||
LAYOUT(FLAT())
|
||||
LIFETIME(MIN 1 MAX 1);
|
||||
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(2), toUInt64(1));
|
||||
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(22), toUInt64(11));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)), toUInt64(11));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(11), materialize(toUInt64(22)));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)), materialize(toUInt64(11)));
|
||||
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(22), toUInt64(111));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)), toUInt64(111));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(11), materialize(toUInt64(222)));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)), materialize(toUInt64(111)));
|
||||
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', toUInt64(11));
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', toUInt64(22));
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(11)));
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)));
|
||||
|
||||
|
||||
DROP DICTIONARY IF EXISTS database_for_dict.dictionary_with_hierarchy;
|
||||
|
||||
CREATE DICTIONARY database_for_dict.dictionary_with_hierarchy
|
||||
(
|
||||
id UInt64, parent_id UInt64 HIERARCHICAL, value String
|
||||
)
|
||||
PRIMARY KEY id
|
||||
SOURCE(CLICKHOUSE(host 'localhost' port 9000 user 'default' table 'dict_source'))
|
||||
LAYOUT(CACHE(SIZE_IN_CELLS 10))
|
||||
LIFETIME(MIN 1 MAX 1);
|
||||
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(2), toUInt64(1));
|
||||
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(22), toUInt64(11));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)), toUInt64(11));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(11), materialize(toUInt64(22)));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)), materialize(toUInt64(11)));
|
||||
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(22), toUInt64(111));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)), toUInt64(111));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', toUInt64(11), materialize(toUInt64(222)));
|
||||
SELECT dictIsIn('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)), materialize(toUInt64(111)));
|
||||
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', toUInt64(11));
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', toUInt64(22));
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(11)));
|
||||
SELECT dictGetHierarchy('database_for_dict.dictionary_with_hierarchy', materialize(toUInt64(22)));
|
||||
|
||||
|
||||
DROP DICTIONARY database_for_dict.dictionary_with_hierarchy;
|
||||
DROP TABLE dict_source;
|
||||
DROP DATABASE database_for_dict;
|
||||
|
Loading…
Reference in New Issue
Block a user