2023-08-14 23:24:41 +00:00
|
|
|
DROP DICTIONARY IF EXISTS 02843_dict;
|
|
|
|
DROP TABLE IF EXISTS 02843_source;
|
|
|
|
DROP TABLE IF EXISTS 02843_join;
|
2023-08-11 22:52:09 +00:00
|
|
|
|
2023-08-14 23:24:41 +00:00
|
|
|
CREATE TABLE 02843_source
|
2023-08-11 22:52:09 +00:00
|
|
|
(
|
|
|
|
id UInt64,
|
|
|
|
value String
|
|
|
|
)
|
|
|
|
ENGINE=Memory;
|
|
|
|
|
2023-08-14 23:24:41 +00:00
|
|
|
CREATE DICTIONARY 02843_dict
|
2023-08-11 22:52:09 +00:00
|
|
|
(
|
|
|
|
id UInt64,
|
|
|
|
value String
|
|
|
|
)
|
|
|
|
PRIMARY KEY id
|
2023-08-14 23:24:41 +00:00
|
|
|
SOURCE(CLICKHOUSE(TABLE '02843_source'))
|
2023-08-11 22:52:09 +00:00
|
|
|
LAYOUT(DIRECT());
|
|
|
|
|
2023-08-14 23:24:41 +00:00
|
|
|
SELECT 1 IN (SELECT dictGet('02843_dict', 'value', materialize('1')));
|
2023-08-11 22:52:09 +00:00
|
|
|
|
2023-08-14 23:24:41 +00:00
|
|
|
CREATE TABLE 02843_join (id UInt8, value String) ENGINE Join(ANY, LEFT, id);
|
|
|
|
SELECT 1 IN (SELECT joinGet(02843_join, 'value', materialize(1)));
|
|
|
|
SELECT 1 IN (SELECT joinGetOrNull(02843_join, 'value', materialize(1)));
|
|
|
|
|
|
|
|
SELECT 1 IN (SELECT materialize(connectionId()));
|
|
|
|
SELECT 1000000 IN (SELECT materialize(getSetting('max_threads')));
|
2024-05-30 12:27:25 +00:00
|
|
|
SELECT 1 in (SELECT file(materialize('a'))); -- { serverError FILE_DOESNT_EXIST }
|
2023-08-14 23:24:41 +00:00
|
|
|
|
|
|
|
EXPLAIN ESTIMATE SELECT 1 IN (SELECT dictGet('02843_dict', 'value', materialize('1')));
|
|
|
|
EXPLAIN ESTIMATE SELECT 1 IN (SELECT joinGet(`02843_join`, 'value', materialize(1)));
|
|
|
|
|
|
|
|
DROP DICTIONARY 02843_dict;
|
|
|
|
DROP TABLE 02843_source;
|
|
|
|
DROP TABLE 02843_join;
|