style: "Fix" style check in CI

This commit is contained in:
Robert Schulze 2022-08-18 10:06:33 +00:00
parent 1220ac0b7a
commit baae7726a7
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -22,6 +22,11 @@ namespace ErrorCodes
namespace
{
/// The regex-based code style check script in CI complains when it sees "ErrorCodes:: ErrorCode" (space added to avoid another match).
/// Because this expression is only used in this file, don't add some suppression mechanism to the already complex style checker, instead
/// work around by creating a namespace alias.
namespace ErrorCodeAlias = ErrorCodes;
/// Throw an exception if the argument is non zero.
class FunctionThrowIf : public IFunction, WithContext
{
@ -91,7 +96,7 @@ public:
custom_message = message_column->getValue<String>();
}
std::optional<ErrorCodes::ErrorCode> custom_error_code;
std::optional<ErrorCodeAlias::ErrorCode> custom_error_code;
if (arguments.size() == 3)
{
if (!isColumnConst(*(arguments[2].column)))
@ -123,7 +128,7 @@ public:
private:
template <typename T>
ColumnPtr execute(const IColumn * in_untyped, const std::optional<String> & message, const std::optional<ErrorCodes::ErrorCode> & error_code) const
ColumnPtr execute(const IColumn * in_untyped, const std::optional<String> & message, const std::optional<ErrorCodeAlias::ErrorCode> & error_code) const
{
const auto * in = checkAndGetColumn<ColumnVector<T>>(in_untyped);