Fix PVS check

This commit is contained in:
Kseniia Sumarokova 2021-05-15 10:05:31 +03:00 committed by GitHub
parent 1d73cd6406
commit 9e65f376cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,7 +65,7 @@ StoragePtr StorageFactory::get(
const ConstraintsDescription & constraints,
bool has_force_restore_data_flag) const
{
String name;
String name, comment;
ASTStorage * storage_def = query.storage;
bool has_engine_args = false;
@ -145,6 +145,9 @@ StoragePtr StorageFactory::get(
else
throw Exception("Unknown table engine " + name, ErrorCodes::UNKNOWN_STORAGE);
}
if (storage_def->comment)
comment = storage_def->comment->as<ASTLiteral &>().value.get<String>();
auto check_feature = [&](String feature_description, FeatureMatcherFn feature_matcher_fn)
{
@ -191,12 +194,6 @@ StoragePtr StorageFactory::get(
}
}
String comment;
if (storage_def->comment)
{
comment = storage_def->comment->as<ASTLiteral &>().value.get<String>();
}
ASTs empty_engine_args;
Arguments arguments{
.engine_name = name,