array_type
Int8
Int16
Int32
Int64
CREATE TABLE test_table_small_{array_type}
(
`set` Array({array_type}),
`subset` Array ({array_type})
)
ENGINE = MergeTree ORDER BY set;
CREATE TABLE test_table_medium_{array_type}
(
`set` Array({array_type}),
`subset` Array ({array_type})
)
ENGINE = MergeTree ORDER BY set;
CREATE TABLE test_table_large_{array_type}
(
`set` Array({array_type}),
`subset` Array ({array_type})
)
ENGINE = MergeTree ORDER BY set;
INSERT INTO test_table_small_{array_type} SELECT groupArraySample(5000)(rand64()) AS set, groupArraySample(500)(rand64()) AS subset FROM numbers(10000000) GROUP BY number % 5000;
INSERT INTO test_table_medium_{array_type} SELECT groupArraySample(50000)(rand64()) AS set, groupArraySample(5000)(rand64()) AS subset FROM numbers(25000000) GROUP BY number % 50000;
INSERT INTO test_table_large_{array_type} SELECT groupArraySample(500000)(rand64()) AS set, groupArraySample(500000)(rand64()) AS subset FROM numbers(50000000) GROUP BY number % 500000;
SELECT hasAll(set, subset) FROM test_table_small_{array_type} FORMAT Null
SELECT hasAll(set, subset) FROM test_table_medium_{array_type} FORMAT Null
SELECT hasAll(set, subset) FROM test_table_large_{array_type} FORMAT Null
DROP TABLE IF EXISTS test_table_small_{array_type}
DROP TABLE IF EXISTS test_table_medium_{array_type}
DROP TABLE IF EXISTS test_table_large_{array_type}