mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 20:24:07 +00:00
Fixed fuzzer crash
This commit is contained in:
parent
a4812aa97b
commit
d2b8d9886f
@ -329,6 +329,12 @@ public:
|
||||
if constexpr (std::is_same_v<ToDataType, DataTypeFixedString>)
|
||||
{
|
||||
const auto & type = argument.type;
|
||||
|
||||
if (!type->isValueUnambiguouslyRepresentedInFixedSizeContiguousMemoryRegion())
|
||||
throw Exception("Cannot reinterpret " + type->getName() +
|
||||
" as FixedString because it is not fixed size and contiguous in memory",
|
||||
ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
|
||||
|
||||
size_t type_value_size_in_memory = type->getSizeOfValueInMemory();
|
||||
data_type = std::make_shared<DataTypeFixedString>(type_value_size_in_memory);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user