mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
Minor modification
This commit is contained in:
parent
3057bbe831
commit
fdc5bb72f5
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
|
|
||||||
namespace ErrorCodes
|
namespace ErrorCodes
|
||||||
{
|
{
|
||||||
extern const int LOGICAL_ERROR;
|
extern const int LOGICAL_ERROR;
|
||||||
@ -49,14 +50,16 @@ CompressionCodecPtr CompressionCodecFactory::get(const String & family_name, std
|
|||||||
if (level && param)
|
if (level && param)
|
||||||
{
|
{
|
||||||
auto level_literal = std::make_shared<ASTLiteral>(static_cast<UInt64>(*level));
|
auto level_literal = std::make_shared<ASTLiteral>(static_cast<UInt64>(*level));
|
||||||
auto param_literal = std::make_shared<ASTLiteral>(static_cast<std::string>(*param));
|
auto param_literal = std::make_shared<ASTLiteral>(*param);
|
||||||
return get(makeASTFunction("CODEC", makeASTFunction(Poco::toUpper(family_name), level_literal, param_literal)), {});
|
return get(makeASTFunction("CODEC", makeASTFunction(Poco::toUpper(family_name), level_literal, param_literal)), {});
|
||||||
}
|
}
|
||||||
else if (param)
|
else if (param)
|
||||||
{
|
{
|
||||||
auto param_literal = std::make_shared<ASTLiteral>(static_cast<std::string>(*param));
|
auto param_literal = std::make_shared<ASTLiteral>(*param);
|
||||||
return get(makeASTFunction("CODEC", makeASTFunction(Poco::toUpper(family_name), param_literal)), {});
|
return get(makeASTFunction("CODEC", makeASTFunction(Poco::toUpper(family_name), param_literal)), {});
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
return get(family_name, level);
|
return get(family_name, level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user