| 43 | } |
| 44 | |
| 45 | PlanNodeAndMappings PlanSymbolReallocator::reallocate(const PlanNodePtr & plan, ContextMutablePtr & context) |
| 46 | { |
| 47 | Names origin_outputs = plan->getOutputNames(); |
| 48 | |
| 49 | SymbolReallocatorVisitor visitor{ |
| 50 | context, [&](auto & mapping) { return SymbolMapper::symbolReallocator(mapping, *context->getSymbolAllocator()); }}; |
| 51 | Void c; |
| 52 | auto [plan_node, mappings] = VisitorUtil::accept(plan, visitor, c); |
| 53 | auto symbol_mapper = SymbolMapper::symbolMapper(mappings); |
| 54 | |
| 55 | NameToNameMap output_symbol_mappings; |
| 56 | for (const auto & output : origin_outputs) |
| 57 | output_symbol_mappings.emplace(output, symbol_mapper.map(output)); |
| 58 | return {plan_node, output_symbol_mappings}; |
| 59 | } |
| 60 | |
| 61 | bool PlanSymbolReallocator::isOverlapping(const DataStream & lho, const DataStream & rho) |
| 62 | { |
no test coverage detected