Fix build

This commit is contained in:
Nikita Mikhaylov 2024-11-01 15:06:52 +01:00
parent f4a7f475dc
commit 603cb16e98

View File

@ -48,9 +48,9 @@ ASTPtr normalizeCreateWorkloadEntityQuery(const IAST & create_query)
/// Returns a type of a workload entity `ptr`
WorkloadEntityType getEntityType(const ASTPtr & ptr)
{
if (auto * res = typeid_cast<ASTCreateWorkloadQuery *>(ptr.get()))
if (auto * res = typeid_cast<ASTCreateWorkloadQuery *>(ptr.get()); res)
return WorkloadEntityType::Workload;
if (auto * res = typeid_cast<ASTCreateResourceQuery *>(ptr.get()))
if (auto * res = typeid_cast<ASTCreateResourceQuery *>(ptr.get()); res)
return WorkloadEntityType::Resource;
chassert(false);
return WorkloadEntityType::MAX;
@ -106,7 +106,7 @@ void forEachReference(
for (const String & resource : resources)
func(resource, res->getWorkloadName(), ReferenceType::ForResource);
}
if (auto * res = typeid_cast<ASTCreateResourceQuery *>(source_entity.get()))
if (auto * res = typeid_cast<ASTCreateResourceQuery *>(source_entity.get()); res)
{
// RESOURCE has no references to be validated, we allow mentioned disks to be created later
}