mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Allow multiple columns in StorageFuzzJSON
This commit is contained in:
parent
0fc402c106
commit
6014dca114
@ -481,7 +481,11 @@ protected:
|
||||
{
|
||||
Columns columns;
|
||||
columns.reserve(block_header.columns());
|
||||
columns.emplace_back(createColumn());
|
||||
for (const auto& col : block_header)
|
||||
{
|
||||
chassert(col.type->getTypeId() == TypeIndex::String);
|
||||
columns.emplace_back(createColumn());
|
||||
}
|
||||
|
||||
return {std::move(columns), block_size};
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
100
|
||||
100
|
||||
100
|
||||
100 100
|
||||
|
@ -54,3 +54,12 @@ ENGINE = FuzzJSON('{"pet":"rat"}', NULL); -- { serverError BAD_ARGUMENTS }
|
||||
DROP TABLE IF EXISTS 02919_test_table_invalid_col_type;
|
||||
|
||||
--
|
||||
DROP TABLE IF EXISTS 02919_test_multi_col;
|
||||
CREATE TABLE 02919_test_multi_col
|
||||
(
|
||||
str1 String,
|
||||
str2 String
|
||||
) ENGINE = FuzzJSON('{"pet":"rat"}', 999);
|
||||
|
||||
SELECT count(str1), count(str2) FROM (SELECT str1, str2 FROM 02919_test_multi_col LIMIT 100);
|
||||
DROP TABLE IF EXISTS 02919_test_multi_col;
|
||||
|
Loading…
Reference in New Issue
Block a user