MCPcopy Create free account
hub / github.com/ByConity/ByConity / allocateLocalTable

Method allocateLocalTable

src/QueryPlan/QueryPlan.cpp:957–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

955}
956
957std::set<StorageID> QueryPlan::allocateLocalTable(ContextPtr context)
958{
959 std::set<StorageID> res;
960 for (const auto & node : nodes)
961 {
962 if (node.step->getType() == IQueryPlanStep::Type::TableScan)
963 {
964 auto * table_scan = dynamic_cast<TableScanStep *>(node.step.get());
965 /// have to get storage_id before allocate to get original storage_id
966 /// instead of storage_id in cloud
967 res.insert(table_scan->getStorageID());
968 table_scan->allocate(context);
969 }
970 else if (node.step->getType() == IQueryPlanStep::Type::TableWrite)
971 {
972 auto write_step = dynamic_cast<TableWriteStep *>(node.step.get());
973 write_step->allocate(context);
974 }
975 }
976 return res;
977}
978
979PlanNodePtr QueryPlan::getPlanNodeById(PlanNodeId node_id) const
980{

Callers 1

getPlanSegmentMethod · 0.80

Calls 5

getTypeMethod · 0.45
getMethod · 0.45
insertMethod · 0.45
getStorageIDMethod · 0.45
allocateMethod · 0.45

Tested by

no test coverage detected