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

Method fromProto

src/QueryPlan/RemoteExchangeSourceStep.cpp:81–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81std::shared_ptr<RemoteExchangeSourceStep>
82RemoteExchangeSourceStep::fromProto(const Protos::RemoteExchangeSourceStep & proto, ContextPtr context)
83{
84 DataStream input_stream;
85 input_stream.fillFromProto(proto.input_stream());
86 auto step_description = proto.step_description();
87
88 PlanSegmentInputs inputs;
89 for (auto & proto_element : proto.inputs())
90 {
91 auto element = std::make_shared<PlanSegmentInput>();
92 element->fillFromProto(proto_element, context);
93 inputs.emplace_back(std::move(element));
94 }
95
96 bool is_add_totals = proto.has_is_add_totals() ? proto.is_add_totals(): false;
97 bool is_add_extremes = proto.has_is_add_extremes() ? proto.is_add_extremes(): false;
98
99 auto step = std::make_unique<RemoteExchangeSourceStep>(inputs, input_stream, is_add_totals, is_add_extremes);
100 step->setStepDescription(step_description);
101
102 return step;
103}
104
105std::shared_ptr<IQueryPlanStep> RemoteExchangeSourceStep::copy(ContextPtr) const
106{

Callers

nothing calls this directly

Calls 3

setStepDescriptionMethod · 0.80
fillFromProtoMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected