MCPcopy Create free account
hub / github.com/apache/datafusion / poll_next

Method poll_next

datafusion/physical-plan/src/test/exec.rs:93–103  ·  view source on GitHub ↗
(self: Pin<&mut Self>, _: &mut Context<'_>)

Source from the content-addressed store, hash-verified

91 type Item = Result<RecordBatch>;
92
93 fn poll_next(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<Option<Self::Item>> {
94 let next_batch = self.index.value();
95
96 Poll::Ready(if next_batch < self.data.len() {
97 let next_batch = self.index.value();
98 self.index.incr();
99 Some(Ok(self.data[next_batch].clone()))
100 } else {
101 None
102 })
103 }
104
105 fn size_hint(&self) -> (usize, Option<usize>) {
106 (self.data.len(), Some(self.data.len()))

Callers

nothing calls this directly

Calls 5

wake_by_refMethod · 0.80
valueMethod · 0.45
lenMethod · 0.45
incrMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected