mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
refactor isCompatibleEnumTypes to remove PVS warning
This commit is contained in:
parent
1984940eb6
commit
2da3893b1f
@ -503,13 +503,13 @@ 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 (!enum_type->contains(*rhs))
|
||||
return false;
|
||||
return enum_type->getMaximumSizeOfValueInMemory() == rhs->getMaximumSizeOfValueInMemory();
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user