MCPcopy Create free account
hub / github.com/apache/arrow / MakeFirstNGeneric

Function MakeFirstNGeneric

cpp/src/arrow/util/iterator_test.cc:251–260  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249
250template <typename T>
251Transformer<T, T> MakeFirstNGeneric(int n) {
252 int remaining = n;
253 return [remaining](T next) mutable -> Result<TransformFlow<T>> {
254 if (remaining > 0) {
255 remaining--;
256 return TransformYield(next);
257 }
258 return TransformFinish();
259 };
260}
261
262TEST(TestIteratorTransform, Truncating) {
263 auto original = VectorIt({1, 2, 3});

Callers

nothing calls this directly

Calls 2

TransformYieldFunction · 0.85
TransformFinishClass · 0.85

Tested by

no test coverage detected