ClickHouse/tests/queries/0_stateless/02025_dictionary_array_nested_map.sql
Azat Khuzhin 4366f7fb3b Remove PREALLOCATE for HASHED/SPARSE_HASHED dictionaries
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>
2023-01-18 20:18:37 +01:00

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