gustavodemorais commented on code in PR #27847:
URL: https://github.com/apache/flink/pull/27847#discussion_r3008411583


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/functions/ptf/ToChangelogFunction.java:
##########
@@ -109,13 +109,22 @@ private static int[] buildNonPartitionIndices(
         return IntStream.range(0, fieldCount).filter(i -> 
!partitionKeySet.contains(i)).toArray();
     }
 
+    /**
+     * Builds a RowKind-to-output-code map. Keys may be comma-separated (e.g., 
"INSERT,
+     * UPDATE_AFTER") to map multiple RowKinds to the same output code.
+     */
     private static Map<RowKind, String> buildOpMap(@Nullable final Map<String, 
String> opMapping) {
         if (opMapping == null) {
             return new EnumMap<>(DEFAULT_OP_MAPPING);
         }
-        final Map<RowKind, String> map = new EnumMap<>(RowKind.class);
-        opMapping.forEach((name, code) -> map.put(RowKind.valueOf(name), 
code));
-        return map;
+        final Map<RowKind, String> result = new EnumMap<>(RowKind.class);

Review Comment:
   Hey, for TO_CHANGELOG invalid mappings are already caught at planning time 
by ToChangelogTypeStrategy, the user will see a validation error



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to