-- Tags: no-parallel

DROP DATABASE IF EXISTS db_for_dict;
CREATE DATABASE db_for_dict;

CREATE DICTIONARY db_for_dict.dict_with_hashed_layout
(
  key1 UInt64,
  value String
)
PRIMARY KEY key1
LAYOUT(HASHED)
SOURCE(CLICKHOUSE(HOST 'localhost' PORT tcpPort() USER 'default' TABLE 'table_for_dict' DB 'db_for_dict'))
LIFETIME(MIN 1 MAX 10);

DETACH DICTIONARY db_for_dict.dict_with_hashed_layout;

ATTACH DICTIONARY db_for_dict.dict_with_hashed_layout;

SHOW CREATE DICTIONARY db_for_dict.dict_with_hashed_layout;

DROP DATABASE IF EXISTS db_for_dict;
