mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 09:32:06 +00:00
more often mutations for complex type
This commit is contained in:
parent
986f00f6d9
commit
14119fc306
@ -523,11 +523,11 @@ DataTypePtr QueryFuzzer::fuzzDataType(DataTypePtr type)
|
||||
{
|
||||
/// Do not replace Array/Tuple/etc. with not Array/Tuple too often.
|
||||
const auto * type_array = typeid_cast<const DataTypeArray *>(type.get());
|
||||
if (type_array && fuzz_rand() % 5 != 0)
|
||||
if (type_array && fuzz_rand() % 4 != 0)
|
||||
return std::make_shared<DataTypeArray>(fuzzDataType(type_array->getNestedType()));
|
||||
|
||||
const auto * type_tuple = typeid_cast<const DataTypeTuple *>(type.get());
|
||||
if (type_tuple && fuzz_rand() % 5 != 0)
|
||||
if (type_tuple && fuzz_rand() % 4 != 0)
|
||||
{
|
||||
DataTypes elements;
|
||||
for (const auto & element : type_tuple->getElements())
|
||||
@ -539,7 +539,7 @@ DataTypePtr QueryFuzzer::fuzzDataType(DataTypePtr type)
|
||||
}
|
||||
|
||||
const auto * type_map = typeid_cast<const DataTypeMap *>(type.get());
|
||||
if (type_map && fuzz_rand() % 5 != 0)
|
||||
if (type_map && fuzz_rand() % 4 != 0)
|
||||
{
|
||||
auto key_type = fuzzDataType(type_map->getKeyType());
|
||||
auto value_type = fuzzDataType(type_map->getValueType());
|
||||
|
Loading…
Reference in New Issue
Block a user