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

Method reallocate

src/QueryPlan/PlanSymbolReallocator.cpp:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45PlanNodeAndMappings 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
61bool PlanSymbolReallocator::isOverlapping(const DataStream & lho, const DataStream & rho)
62{

Callers 2

ensureFunction · 0.80
printFunction · 0.80

Calls 3

getOutputNamesMethod · 0.45
emplaceMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected