comment child_plans in ReadFromMerge

This commit is contained in:
vdimir 2023-03-29 09:42:32 +00:00
parent 7a85974c35
commit 588fdcffdf
No known key found for this signature in database
GPG Key ID: 6EE4CE2BEDC51862
2 changed files with 4 additions and 0 deletions

View File

@ -655,6 +655,8 @@ QueryPipelineBuilderPtr ReadFromMerge::createSources(
if (real_column_names.empty())
real_column_names.push_back(ExpressionActions::getSmallestColumn(storage_snapshot->metadata->getColumns().getAllPhysical()).name);
/// Steps for reading from child tables should have the same lifetime as the current step
/// because `builder` can have references to them (mainly for EXPLAIN PIPELINE).
QueryPlan & plan = child_plans.emplace_back();
StorageView * view = dynamic_cast<StorageView *>(storage.get());

View File

@ -159,6 +159,8 @@ private:
StoragePtr storage_merge;
StorageSnapshotPtr merge_storage_snapshot;
/// Store read plan for each child table.
/// It's needed to guarantee lifetime for child steps to be the same as for this step.
std::vector<QueryPlan> child_plans;
SelectQueryInfo query_info;