mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-02 12:32:04 +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)
|
bool isCompatibleEnumTypes(const IDataType * lhs, const IDataType * rhs)
|
||||||
{
|
{
|
||||||
WhichDataType which{lhs};
|
if (IDataTypeEnum const * enum_type = dynamic_cast<IDataTypeEnum const *>(lhs))
|
||||||
if (!which.isEnum())
|
{
|
||||||
return false;
|
|
||||||
IDataTypeEnum const * enum_type = dynamic_cast<IDataTypeEnum const *>(lhs);
|
|
||||||
if (!enum_type->contains(*rhs))
|
if (!enum_type->contains(*rhs))
|
||||||
return false;
|
return false;
|
||||||
return enum_type->getMaximumSizeOfValueInMemory() == rhs->getMaximumSizeOfValueInMemory();
|
return enum_type->getMaximumSizeOfValueInMemory() == rhs->getMaximumSizeOfValueInMemory();
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StorageInMemoryMetadata::check(const Names & column_names, const NamesAndTypesList & virtuals, const StorageID & storage_id) const
|
void StorageInMemoryMetadata::check(const Names & column_names, const NamesAndTypesList & virtuals, const StorageID & storage_id) const
|
||||||
|
Loading…
Reference in New Issue
Block a user