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

Method prepareConsume

src/Processors/Transforms/SortingTransform.cpp:221–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221IProcessor::Status SortingTransform::prepareConsume()
222{
223 auto & input = inputs.front();
224 auto & output = outputs.front();
225
226 /// Check can output.
227
228 if (output.isFinished())
229 {
230 input.close();
231 return Status::Finished;
232 }
233
234 if (!output.canPush())
235 {
236 input.setNotNeeded();
237 return Status::PortFull;
238 }
239
240 if (generated_chunk)
241 output.push(std::move(generated_chunk));
242
243 /// Check can input.
244 if (!current_chunk)
245 {
246 if (input.isFinished())
247 return Status::Finished;
248
249 if (!input.hasData())
250 {
251 input.setNeeded();
252 return Status::NeedData;
253 }
254
255 current_chunk = input.pull(true);
256 }
257
258 /// Now consume.
259 return Status::Ready;
260}
261
262IProcessor::Status SortingTransform::prepareSerialize()
263{

Callers

nothing calls this directly

Calls 9

frontMethod · 0.80
canPushMethod · 0.80
setNotNeededMethod · 0.80
hasDataMethod · 0.80
setNeededMethod · 0.80
isFinishedMethod · 0.45
closeMethod · 0.45
pushMethod · 0.45
pullMethod · 0.45

Tested by

no test coverage detected