mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 03:22:14 +00:00
refactor isCompatibleEnumTypes to remove PVS warning
This commit is contained in:
parent
1984940eb6
commit
2da3893b1f
@ -503,14 +503,14 @@ namespace
|
||||
*/
|
||||
bool isCompatibleEnumTypes(const IDataType * lhs, const IDataType * rhs)
|
||||
{
|
||||
WhichDataType which{lhs};
|
||||
if (!which.isEnum())
|
||||
return false;
|
||||
IDataTypeEnum const * enum_type = dynamic_cast<IDataTypeEnum const *>(lhs);
|
||||
if (IDataTypeEnum const * enum_type = dynamic_cast<IDataTypeEnum const *>(lhs))
|
||||
{
|
||||
if (!enum_type->contains(*rhs))
|
||||
return false;
|
||||
return enum_type->getMaximumSizeOfValueInMemory() == rhs->getMaximumSizeOfValueInMemory();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void StorageInMemoryMetadata::check(const Names & column_names, const NamesAndTypesList & virtuals, const StorageID & storage_id) const
|
||||
|
Loading…
Reference in New Issue
Block a user