mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 00:30:49 +00:00
Using std::shared_ptr for functions and AST [#METR-21503].
This commit is contained in:
parent
fc65afb6f0
commit
6a51b999da
@ -204,9 +204,9 @@ private:
|
||||
return;
|
||||
|
||||
IdentifierNameSet identifiers{};
|
||||
collectIdentifiersNoSubqueries(condition, identifiers);
|
||||
collectIdentifiersNoSubqueries(condition.get(), identifiers);
|
||||
|
||||
if (hasPrimaryKeyAtoms(condition) || !isSubsetOfTableColumns(identifiers))
|
||||
if (hasPrimaryKeyAtoms(condition.get()) || !isSubsetOfTableColumns(identifiers))
|
||||
return;
|
||||
|
||||
/// if condition is not "good" - check that it can be moved
|
||||
|
@ -246,7 +246,7 @@ void StorageDistributed::reshardPartitions(ASTPtr query, const String & database
|
||||
if (!resharding_worker.isStarted())
|
||||
throw Exception{"Resharding background thread is not running", ErrorCodes::RESHARDING_NO_WORKER};
|
||||
|
||||
if (coordinator)
|
||||
if (!coordinator.isNull())
|
||||
throw Exception{"Use of COORDINATE WITH is forbidden in ALTER TABLE ... RESHARD"
|
||||
" queries for distributed tables",
|
||||
ErrorCodes::RESHARDING_INVALID_PARAMETERS};
|
||||
@ -286,9 +286,9 @@ void StorageDistributed::reshardPartitions(ASTPtr query, const String & database
|
||||
ASTAlterQuery::Parameters & parameters = alter_query.parameters.back();
|
||||
|
||||
parameters.type = ASTAlterQuery::RESHARD_PARTITION;
|
||||
if (first_partition)
|
||||
if (!first_partition.isNull())
|
||||
parameters.partition = std::make_shared<ASTLiteral>({}, first_partition);
|
||||
if (last_partition)
|
||||
if (!last_partition.isNull())
|
||||
parameters.last_partition = std::make_shared<ASTLiteral>({}, last_partition);
|
||||
|
||||
ASTPtr expr_list = std::make_shared<ASTExpressionList>();
|
||||
|
@ -122,7 +122,7 @@ void StorageMaterializedView::drop()
|
||||
if (context.tryGetTable(database_name, inner_table_name))
|
||||
{
|
||||
/// Состваляем и выполняем запрос drop для внутреннего хранилища.
|
||||
ASTDropQuery *drop_query = std::make_shared<ASTDropQuery>();
|
||||
auto drop_query = std::make_shared<ASTDropQuery>();
|
||||
drop_query->database = database_name;
|
||||
drop_query->table = inner_table_name;
|
||||
ASTPtr ast_drop_query = drop_query;
|
||||
|
Loading…
Reference in New Issue
Block a user