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

Method fromProto

src/QueryPlan/WindowStep.cpp:241–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241std::shared_ptr<WindowStep> WindowStep::fromProto(const Protos::WindowStep & proto, ContextPtr)
242{
243 auto [step_description, base_input_stream] = ITransformingStep::deserializeFromProtoBase(proto.query_plan_base());
244 WindowDescription window_description;
245 window_description.fillFromProto(proto.window_description());
246 std::vector<WindowFunctionDescription> window_functions;
247 for (const auto & proto_element : proto.window_functions())
248 {
249 WindowFunctionDescription element;
250 element.fillFromProto(proto_element);
251 window_functions.emplace_back(std::move(element));
252 }
253 auto need_sort = proto.need_sort();
254 SortDescription prefix_description;
255 for (const auto & proto_element : proto.prefix_description())
256 {
257 SortColumnDescription element;
258 element.fillFromProto(proto_element);
259 prefix_description.emplace_back(std::move(element));
260 }
261 auto step = std::make_shared<WindowStep>(base_input_stream, window_description, window_functions, need_sort, prefix_description);
262 step->setStepDescription(step_description);
263 return step;
264}
265
266void WindowStep::scatterByPartitionIfNeeded(QueryPipeline& pipeline)
267{

Callers

nothing calls this directly

Calls 3

setStepDescriptionMethod · 0.80
fillFromProtoMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected