```
milovidov-desktop :) CREATE DICTIONARY dict
:-] (
:-]     k1 UInt64,
:-]     k2 UInt8,
:-]     value String
:-] )
:-] PRIMARY KEY k1, k2
:-] SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'dict'))
:-] LIFETIME(1000)
:-] LAYOUT(COMPLEX_KEY_HASHED());

CREATE DICTIONARY dict
(
    `k1` UInt64,
    `k2` UInt8,
    `value` String
)
PRIMARY KEY k1, k2
SOURCE(CLICKHOUSE(HOST 'localhost' PORT 9000 USER 'default' TABLE 'dict'))
LIFETIME(MIN 0 MAX 1000)
LAYOUT(COMPLEX_KEY_HASHED())

Ok.

0 rows in set. Elapsed: 0.001 sec. 

milovidov-desktop :) SELECT dictGetString('default.dict', 'third_column', (1, 2, 3, 4, 5, 6, 7, 8, 9, 10));

SELECT dictGetString('default.dict', 'third_column', (1, 2, 3, 4, 5, 6, 7, 8, 9, 10))
```
{
    
    auto empty_sample_block = sample_block.cloneEmpty();
    if (is_local)
    {
        auto stream = executeQuery(query, context, true).getInputStream();
        stream = std::make_shared<ConvertingBlockInputStream>(stream, empty_sample_block, ConvertingBlockInputStream::MatchColumnsMode::Position);
        return stream;
    }
    return std::make_shared<RemoteBlockInputStream>(pool, query, empty_sample_block, context);
}
std::string ClickHouseDictionarySource::doInvalidateQuery(const std::string & request) const
{
    LOG_TRACE(log, "Performing invalidate query");
    if (is_local)
    {
        Context query_context = context;
        auto input_block = executeQuery(request, query_context, true).getInputStream();
        return readInvalidateQuery(*input_block);
    }
    else
    {
        
        Block invalidate_sample_block;
        RemoteBlockInputStream invalidate_stream(pool, request, invalidate_sample_block, context);
        return readInvalidateQuery(invalidate_stream);
    }
}
void registerDictionarySourceClickHouse(DictionarySourceFactory & factory)