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

Function MakeMappedGenerator

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

Source from the content-addressed store, hash-verified

269 typename Mapped = detail::result_of_t<MapFn(const T&)>,
270 typename V = typename EnsureFuture<Mapped>::type::ValueType>
271AsyncGenerator<V> MakeMappedGenerator(AsyncGenerator<T> source_generator, MapFn map) {
272 auto map_callback = [map = std::move(map)](const T& val) mutable -> Future<V> {
273 return ToFuture(map(val));
274 };
275 return MappingGenerator<T, V>(std::move(source_generator), std::move(map_callback));
276}
277
278/// \brief Create a generator that will apply the map function to
279/// 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