Github user aljoscha commented on a diff in the pull request:
https://github.com/apache/flink/pull/4320#discussion_r132446175
--- Diff:
flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/PatternStream.java
---
@@ -213,14 +321,97 @@
* @return {@link DataStream} which contains the resulting elements
from the pattern flat select
* function.
*/
- public <R> SingleOutputStreamOperator<R> flatSelect(final
PatternFlatSelectFunction<T, R> patternFlatSelectFunction, TypeInformation<R>
outTypeInfo) {
- SingleOutputStreamOperator<Map<String, List<T>>> patternStream =
-
CEPOperatorUtils.createPatternStream(inputStream, pattern);
-
- return patternStream.flatMap(
- new PatternFlatSelectMapper<>(
-
patternStream.getExecutionEnvironment().clean(patternFlatSelectFunction)
- )).returns(outTypeInfo);
+ public <R> SingleOutputStreamOperator<R> flatSelect(
+ final PatternFlatSelectFunction<T, R>
patternFlatSelectFunction,
+ final TypeInformation<R> outTypeInfo) {
+ return CEPOperatorUtils.createPatternStream(
+ inputStream,
+ pattern,
+ clean(patternFlatSelectFunction),
+ outTypeInfo);
+ }
+
+ /**
+ * Applies a flat select function to the detected pattern sequence. For
each pattern sequence the
+ * provided {@link PatternFlatSelectFunction} is called. The pattern
select function can produce
+ * exactly one resulting element.
+ *
+ * <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 exactly one resulting element.
+ *
+ * <p>You can get the stream of late data using
--- End diff --
Same as above.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---