fix build and tests

This commit is contained in:
Anton Popov 2024-01-03 16:53:47 +00:00
parent ce1b978a2d
commit cf4604bfb6
4 changed files with 6 additions and 13 deletions

View File

@ -669,8 +669,7 @@ bool optimizeUseAggregateProjections(QueryPlan::Node & node, QueryPlan::Nodes &
else
{
auto storage_snapshot = reading->getStorageSnapshot();
auto proj_snapshot = std::make_shared<StorageSnapshot>(
storage_snapshot->storage, storage_snapshot->metadata, storage_snapshot->object_columns);
auto proj_snapshot = std::make_shared<StorageSnapshot>(storage_snapshot->storage, storage_snapshot->metadata);
proj_snapshot->addProjection(best_candidate->projection);
auto query_info_copy = query_info;

View File

@ -196,8 +196,7 @@ bool optimizeUseNormalProjections(Stack & stack, QueryPlan::Nodes & nodes)
}
auto storage_snapshot = reading->getStorageSnapshot();
auto proj_snapshot = std::make_shared<StorageSnapshot>(
storage_snapshot->storage, storage_snapshot->metadata, storage_snapshot->object_columns); //, storage_snapshot->data);
auto proj_snapshot = std::make_shared<StorageSnapshot>(storage_snapshot->storage, storage_snapshot->metadata);
proj_snapshot->addProjection(best_candidate->projection);
auto query_info_copy = query_info;

View File

@ -488,14 +488,6 @@ std::vector<ReadFromMerge::ChildPlan> ReadFromMerge::createChildrenPlans(SelectQ
query_info_.input_order_info = input_sorting_info;
}
<<<<<<< HEAD
=======
auto sample_block = merge_storage_snapshot->getMetadataForQuery()->getSampleBlock();
std::vector<std::unique_ptr<QueryPipelineBuilder>> pipelines;
QueryPlanResourceHolder resources;
>>>>>>> parent of a01acf5d2a6 (remove projection from StorageSnapshot)
for (const auto & table : selected_tables)
{
size_t current_need_streams = tables_count >= num_streams ? 1 : (num_streams / tables_count);
@ -548,7 +540,7 @@ std::vector<ReadFromMerge::ChildPlan> ReadFromMerge::createChildrenPlans(SelectQ
ASTPtr required_columns_expr_list = std::make_shared<ASTExpressionList>();
ASTPtr column_expr;
auto sample_block = merge_storage_snapshot->metadata->getSampleBlock();
auto sample_block = merge_storage_snapshot->getMetadataForQuery()->getSampleBlock();
for (const auto & column : real_column_names)
{

View File

@ -21,7 +21,10 @@ namespace ErrorCodes
std::shared_ptr<StorageSnapshot> StorageSnapshot::clone(DataPtr data_) const
{
auto res = std::make_shared<StorageSnapshot>(storage, metadata, object_columns);
res->projection = projection;
res->data = std::move(data_);
return res;
}