Github user zhangminglei commented on a diff in the pull request:
https://github.com/apache/flink/pull/5447#discussion_r167395827
--- Diff:
flink-streaming-java/src/main/java/org/apache/flink/streaming/runtime/tasks/OperatorChain.java
---
@@ -591,16 +591,18 @@ public void collect(StreamRecord<T> record) {
operator.setKeyContextElement1(copy);
operator.processElement(copy);
} catch (ClassCastException e) {
- // Enrich error message
- ClassCastException replace = new
ClassCastException(
- String.format(
- "%s. Failed to push OutputTag
with id '%s' to operator. " +
- "This can occur when multiple
OutputTags with different types " +
- "but identical names are being
used.",
- e.getMessage(),
- outputTag.getId()));
-
- throw new
ExceptionInChainedOperatorException(replace);
+ if (outputTag != null) {
--- End diff --
Thanks @zentol A good method!
---