mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Fix style.
This commit is contained in:
parent
2e242fa991
commit
ce81166c7e
@ -2,8 +2,8 @@
|
||||
#include <Backups/BackupSettings.h>
|
||||
#include <Core/SettingsFields.h>
|
||||
#include <Parsers/ASTBackupQuery.h>
|
||||
#include <Parsers/ASTSetQuery.h>
|
||||
#include <Parsers/ASTFunction.h>
|
||||
#include <Parsers/ASTSetQuery.h>
|
||||
#include <Parsers/ASTLiteral.h>
|
||||
#include <IO/ReadHelpers.h>
|
||||
|
||||
|
@ -10,8 +10,8 @@ bool KnownObjectNames::exists(const String & name) const
|
||||
std::lock_guard lock{mutex};
|
||||
if (names.contains(name))
|
||||
return true;
|
||||
|
||||
if (case_insensitive_names.empty())
|
||||
|
||||
if (!case_insensitive_names.empty())
|
||||
{
|
||||
String lower_name = Poco::toLower(name);
|
||||
if (case_insensitive_names.contains(lower_name))
|
||||
|
@ -71,6 +71,6 @@ public:
|
||||
|
||||
/// Wipes sensitive data and cuts to a specified maximum length in one function call.
|
||||
/// If the maximum length is zero then the function doesn't cut to the maximum length.
|
||||
std::string wipeSensitiveDataAndCutToLength(const std::string & str, size_t max_length = 0);
|
||||
std::string wipeSensitiveDataAndCutToLength(const std::string & str, size_t max_length);
|
||||
|
||||
}
|
||||
|
@ -445,8 +445,8 @@ void FormatFactory::registerInputFormat(const String & name, InputCreator input_
|
||||
if (target)
|
||||
throw Exception("FormatFactory: Input format " + name + " is already registered", ErrorCodes::LOGICAL_ERROR);
|
||||
target = std::move(input_creator);
|
||||
KnownFormatNames::instance().add(name);
|
||||
registerFileExtension(name, name);
|
||||
KnownFormatNames::instance().add(name);
|
||||
}
|
||||
|
||||
void FormatFactory::registerNonTrivialPrefixAndSuffixChecker(const String & name, NonTrivialPrefixAndSuffixChecker non_trivial_prefix_and_suffix_checker)
|
||||
@ -455,7 +455,6 @@ void FormatFactory::registerNonTrivialPrefixAndSuffixChecker(const String & name
|
||||
if (target)
|
||||
throw Exception("FormatFactory: Non trivial prefix and suffix checker " + name + " is already registered", ErrorCodes::LOGICAL_ERROR);
|
||||
target = std::move(non_trivial_prefix_and_suffix_checker);
|
||||
KnownFormatNames::instance().add(name);
|
||||
}
|
||||
|
||||
void FormatFactory::registerAppendSupportChecker(const String & name, AppendSupportChecker append_support_checker)
|
||||
@ -486,6 +485,7 @@ void FormatFactory::registerOutputFormat(const String & name, OutputCreator outp
|
||||
throw Exception("FormatFactory: Output format " + name + " is already registered", ErrorCodes::LOGICAL_ERROR);
|
||||
target = std::move(output_creator);
|
||||
registerFileExtension(name, name);
|
||||
KnownFormatNames::instance().add(name);
|
||||
}
|
||||
|
||||
void FormatFactory::registerFileExtension(const String & extension, const String & format_name)
|
||||
|
@ -641,12 +641,6 @@ void ASTFunction::formatImplWithoutAlias(const FormatSettings & settings, Format
|
||||
if (arguments->children[i]->as<ASTSetQuery>())
|
||||
settings.ostr << "SETTINGS ";
|
||||
|
||||
if ((i == 1) && special_hilite_regexp
|
||||
&& highlightStringLiteralWithMetacharacters(arguments->children[i], settings, "|()^$.[]?*+{:-"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!settings.show_secrets && (secret_arguments.first <= i) && (i < secret_arguments.second))
|
||||
{
|
||||
settings.ostr << "'[HIDDEN]'";
|
||||
@ -655,6 +649,12 @@ void ASTFunction::formatImplWithoutAlias(const FormatSettings & settings, Format
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((i == 1) && special_hilite_regexp
|
||||
&& highlightStringLiteralWithMetacharacters(arguments->children[i], settings, "|()^$.[]?*+{:-"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
arguments->children[i]->formatImpl(settings, state, nested_dont_need_parens);
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
/// do not print empty parentheses if there are no args - compatibility with new AST for data types and engine names.
|
||||
bool no_empty_args = false;
|
||||
|
||||
/// Kind of this function-like expression, how it's actually used.
|
||||
/// Specifies where this function-like expression is used.
|
||||
enum class Kind
|
||||
{
|
||||
ORDINARY_FUNCTION,
|
||||
|
@ -29,7 +29,7 @@ public:
|
||||
ASTPtr clone() const override;
|
||||
|
||||
void formatImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override;
|
||||
|
||||
|
||||
bool hasSecretParts() const override;
|
||||
|
||||
void updateTreeHashImpl(SipHash & hash_state) const override;
|
||||
|
@ -210,7 +210,7 @@ namespace
|
||||
{
|
||||
if (!ParserIdentifierWithOptionalParameters{}.parse(pos, backup_name, expected))
|
||||
return false;
|
||||
|
||||
|
||||
backup_name->as<ASTFunction &>().kind = ASTFunction::Kind::BACKUP_NAME;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user