mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-16 11:22:12 +00:00
4366f7fb3b
It does not give significant benefit, but now, you hashed/sparse_hashed dictionaries can be filled in parallel (#40003), using sharded dictionaries, and this should be used instead of PREALLOCATE. Note, that dictionaries, that had been created with PREALLOCATE will work, but simply ignore this attribute. Fixes: #41985 (cc @alexey-milovidov) Reverts: #23979 (cc @kitaisreal) Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
26 lines
657 B
SQL
26 lines
657 B
SQL
CREATE TABLE dict_nested_map_test_table
|
|
(
|
|
test_id UInt32,
|
|
type String,
|
|
test_config Array(Map(String, Decimal(28,12))),
|
|
ncp UInt8
|
|
)
|
|
ENGINE=MergeTree()
|
|
ORDER BY test_id;
|
|
|
|
INSERT INTO dict_nested_map_test_table VALUES (3, 't', [{'l': 0.0, 'h': 10000.0, 't': 0.1}, {'l': 10001.0, 'h': 100000000000000.0, 't': 0.2}], 0);
|
|
|
|
CREATE DICTIONARY dict_nested_map_dictionary
|
|
(
|
|
test_id UInt32,
|
|
type String,
|
|
test_config Array(Map(String, Decimal(28,12))),
|
|
ncp UInt8
|
|
)
|
|
PRIMARY KEY test_id
|
|
SOURCE(CLICKHOUSE(TABLE 'dict_nested_map_test_table'))
|
|
LAYOUT(HASHED())
|
|
LIFETIME(MIN 1 MAX 1000000);
|
|
|
|
SELECT dictGet('dict_nested_map_dictionary', 'test_config', toUInt64(3));
|