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

Function MakeMappedGenerator

cpp/src/arrow/util/async_generator.h:272–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270 typename Mapped = std::invoke_result_t<MapFn, const T&>,
271 typename V = typename EnsureFuture<Mapped>::type::ValueType>
272AsyncGenerator<V> MakeMappedGenerator(AsyncGenerator<T> source_generator, MapFn map) {
273 auto map_callback = [map = std::move(map)](const T& val) mutable -> Future<V> {
274 return ToFuture(map(val));
275 };
276 return MappingGenerator<T, V>(std::move(source_generator), std::move(map_callback));
277}
278
279/// \brief Create a generator that will apply the map function to
280/// each element of source. The map function is not called on the end

Callers 15

FragmentToBatchesFunction · 0.85
FragmentsToBatchesFunction · 0.85
ScanBatchesAsyncMethod · 0.85
ToTableAsyncMethod · 0.85
CountRowsAsyncMethod · 0.85
MakeScanNodeFunction · 0.85
genMethod · 0.85
genMethod · 0.85
GetFileInfoGeneratorMethod · 0.85
StreamingReaderImplMethod · 0.85
MakeAsyncMethod · 0.85

Calls 2

ToFutureFunction · 0.85
mapFunction · 0.85

Tested by 6

genMethod · 0.68
genMethod · 0.68
SlowdownABitFunction · 0.68
MakeJitteryFunction · 0.68
TESTFunction · 0.68
TESTFunction · 0.68