@Deprecated
	public <L, R> SingleOutputStreamOperator<Either<L, R>> flatSelect(
			final PatternFlatTimeoutFunction<T, L> patternFlatTimeoutFunction,
			final PatternFlatSelectFunction<T, R> patternFlatSelectFunction) {

		final TypeInformation<L> timedOutTypeInfo = TypeExtractor.getUnaryOperatorReturnType(
			patternFlatTimeoutFunction,
			PatternFlatTimeoutFunction.class,
			0,
			1,
			new int[]{2, 0},
			builder.getInputType(),
			null,
			false);

		final TypeInformation<R> mainTypeInfo = TypeExtractor.getUnaryOperatorReturnType(
			patternFlatSelectFunction,
			PatternFlatSelectFunction.class,
			0,
			1,
			new int[]{1, 0},
			builder.getInputType(),
			null,
			false);

		final OutputTag<L> outputTag = new OutputTag<>(UUID.randomUUID().toString(), timedOutTypeInfo);

		final PatternProcessFunction<T, R> processFunction =
			fromFlatSelect(builder.clean(patternFlatSelectFunction))
				.withTimeoutHandler(outputTag, builder.clean(patternFlatTimeoutFunction))
				.build();

		final SingleOutputStreamOperator<R> mainStream = process(processFunction, mainTypeInfo);
		final DataStream<L> timedOutStream = mainStream.getSideOutput(outputTag);
		final TypeInformation<Either<L, R>> outTypeInfo = new EitherTypeInfo<>(timedOutTypeInfo, mainTypeInfo);

		return mainStream
				.connect(timedOutStream)
				.map(new CoMapTimeout<>())
				.returns(outTypeInfo);
	}
@ Deprecated public < L , R > SingleOutputStreamOperator < Either < L , R > > flatSelect ( final PatternFlatTimeoutFunction < T , L > patternFlatTimeoutFunction , final PatternFlatSelectFunction < T , R > patternFlatSelectFunction ) { final TypeInformation < L > timedOutTypeInfo = TypeExtractor . getUnaryOperatorReturnType ( patternFlatTimeoutFunction , PatternFlatTimeoutFunction . class , 0 , 1 , new int [ ] { 2 , 0 } , builder . getInputType ( ) , null , false ) ; final TypeInformation < R > mainTypeInfo = TypeExtractor . getUnaryOperatorReturnType ( patternFlatSelectFunction , PatternFlatSelectFunction . class , 0 , 1 , new int [ ] { 1 , 0 } , builder . getInputType ( ) , null , false ) ; final OutputTag < L > outputTag = new OutputTag < > ( UUID . randomUUID ( ) . toString ( ) , timedOutTypeInfo ) ; final PatternProcessFunction < T , R > processFunction = fromFlatSelect ( builder . clean ( patternFlatSelectFunction ) ) . withTimeoutHandler ( outputTag , builder . clean ( patternFlatTimeoutFunction ) ) . build ( ) ; final SingleOutputStreamOperator < R > mainStream = process ( processFunction , mainTypeInfo ) ; final DataStream < L > timedOutStream = mainStream . getSideOutput ( outputTag ) ; final TypeInformation < Either < L , R > > outTypeInfo = new EitherTypeInfo < > ( timedOutTypeInfo , mainTypeInfo ) ; return mainStream . connect ( timedOutStream ) . map ( new CoMapTimeout < > ( ) ) . returns ( outTypeInfo ) ; }
Applies a flat select function to the detected pattern sequence. For each pattern sequence
the provided {@link PatternFlatSelectFunction} is called. The pattern flat select function
can produce an arbitrary number of resulting elements.

<p>Applies a timeout function to a partial pattern sequence which has timed out. For each
partial pattern sequence the provided {@link PatternFlatTimeoutFunction} is called. The
pattern timeout function can produce an arbitrary number of resulting elements.

@param patternFlatTimeoutFunction The pattern flat timeout function which is called for each
partial pattern sequence which has timed out.
@param patternFlatSelectFunction The pattern flat select function which is called for each
detected pattern sequence.
@param <L> Type of the resulting timeout events
@param <R> Type of the resulting events

@deprecated Use {@link PatternStream#flatSelect(OutputTag, PatternFlatTimeoutFunction, PatternFlatSelectFunction)}
that returns timed out events as a side-output

@return {@link DataStream} which contains the resulting events from the pattern flat select
function or the resulting timeout events from the pattern flat timeout function wrapped in an
{@link Either} type.