public static TypeInformation <TOut> GetFlatMapReturnTypes <TIn, TOut>( IFlatMapFunction <TIn, TOut> flatMapInterface, TypeInformation <TIn> inType, string functionName, bool allowMissing) => GetUnaryOperatorReturnType <TIn, TOut>( flatMapInterface, typeof(IFlatMapFunction <TIn, TOut>), 0, 1, new int[] { 1, 0 }, inType, functionName, allowMissing);
/// <summary> /// Applies a FlatMap transformation on a <see cref="DataStream{T}"/>. The transformation calls a <see cref="IFlatMapFunction{TInput,TOutput}"/> for each element of the DataStream. Each FlatMapFunction call can return any number of elements including none. The user can also extend <see cref="IRichFunction"/> to gain access to other features provided by the <see cref="IRichFunction"/> interface. /// </summary> /// <typeparam name="TOutput">The output type.</typeparam> /// <param name="flatMapper">The MapFunction that is called for each element of the DataStream.</param> /// <returns>The transformed <see cref="DataStream{T}"/>.</returns> public SingleOutputStreamOperator <TOutput> FlatMap <TOutput>(IFlatMapFunction <TElement, TOutput> flatMapper) { var outType = TypeExtractor.GetFlatMapReturnTypes(Clean(flatMapper), Type, Utils.GetCallLocationName(), true); return(Transform("Flat Map", outType, new StreamFlatMap <TElement, TOutput>(Clean(flatMapper)))); }
public StreamFlatMap(IFlatMapFunction <TInput, TOutput> userFunction) : base(userFunction) => ChainingStrategy = ChainingStrategy.Always;
public static TypeInformation <TOut> GetFlatMapReturnTypes <TIn, TOut>(IFlatMapFunction <TIn, TOut> flatMapInterface, TypeInformation <TIn> inType) => GetFlatMapReturnTypes(flatMapInterface, inType, null, false);