mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Fix new occurrences of new clang-tidy warnings
This commit is contained in:
parent
e3cfec5b09
commit
d66dcdad79
@ -126,7 +126,7 @@ SeekableReadBufferPtr CachedReadBufferFromRemoteFS::getCacheReadBuffer(size_t of
|
||||
local_read_settings.local_fs_method = LocalFSReadMethod::pread;
|
||||
|
||||
auto buf = createReadBufferFromFileBase(path, local_read_settings);
|
||||
auto from_fd = dynamic_cast<ReadBufferFromFileDescriptor*>(buf.get());
|
||||
auto * from_fd = dynamic_cast<ReadBufferFromFileDescriptor*>(buf.get());
|
||||
if (from_fd && from_fd->size() == 0)
|
||||
throw Exception(ErrorCodes::LOGICAL_ERROR, "Attempt to read from an empty cache file: {}", path);
|
||||
|
||||
|
@ -18,7 +18,7 @@ void ConvertFunctionOrLikeData::visit(ASTFunction & function, ASTPtr &)
|
||||
std::unordered_map<ASTPtr, std::shared_ptr<ASTLiteral>> identifier_to_literals;
|
||||
for (auto & child : function.children)
|
||||
{
|
||||
if (auto expr_list_fn = child->as<ASTExpressionList>())
|
||||
if (auto * expr_list_fn = child->as<ASTExpressionList>())
|
||||
{
|
||||
ASTs unique_elems;
|
||||
for (const auto & child_expr_fn : expr_list_fn->children)
|
||||
@ -41,7 +41,7 @@ void ConvertFunctionOrLikeData::visit(ASTFunction & function, ASTPtr &)
|
||||
|
||||
/// Second one is string literal.
|
||||
auto identifier = arguments[0];
|
||||
auto literal = arguments[1]->as<ASTLiteral>();
|
||||
auto * literal = arguments[1]->as<ASTLiteral>();
|
||||
if (!identifier || !literal || literal->value.getType() != Field::Types::String)
|
||||
continue;
|
||||
|
||||
|
@ -14,7 +14,7 @@ class ConvertFunctionOrLikeData
|
||||
public:
|
||||
using TypeToVisit = ASTFunction;
|
||||
|
||||
void visit(ASTFunction & function, ASTPtr & ast);
|
||||
static void visit(ASTFunction & function, ASTPtr & ast);
|
||||
};
|
||||
|
||||
using ConvertFunctionOrLikeVisitor = InDepthNodeVisitor<OneTypeMatcher<ConvertFunctionOrLikeData>, true>;
|
||||
|
@ -205,7 +205,7 @@ void AggregatingStep::transformPipeline(QueryPipelineBuilder & pipeline, const B
|
||||
|
||||
for (size_t set_counter = 0; set_counter < grouping_sets_size; ++set_counter)
|
||||
{
|
||||
auto & header = ports[set_counter]->getHeader();
|
||||
const auto & header = ports[set_counter]->getHeader();
|
||||
|
||||
/// Here we create a DAG which fills missing keys and adds `__grouping_set` column
|
||||
auto dag = std::make_shared<ActionsDAG>(header.getColumnsWithTypeAndName());
|
||||
|
Loading…
Reference in New Issue
Block a user