twalthr commented on code in PR #26516:
URL: https://github.com/apache/flink/pull/26516#discussion_r2065864255


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/ChangelogModeJsonDeserializer.java:
##########
@@ -49,8 +51,14 @@ public ChangelogMode deserialize(
         ChangelogMode.Builder builder = ChangelogMode.newBuilder();
         JsonNode rowKindsNode = jsonParser.readValueAsTree();
         for (JsonNode rowKindNode : rowKindsNode) {
-            RowKind rowKind = 
RowKind.valueOf(rowKindNode.asText().toUpperCase());
-            builder.addContainedKind(rowKind);
+            final String rowKindText = rowKindNode.asText().toUpperCase();

Review Comment:
   we can also just remove this `toUpperCase` . IMHO `toUpperCase` / 
`toLowerCase` are just adding unnecessary runtime overhead and lead to weird 
bugs.



##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/ChangelogModeJsonSerializer.java:
##########
@@ -49,7 +50,12 @@ public void serialize(
             throws IOException {
         jsonGenerator.writeStartArray();
         for (RowKind rowKind : changelogMode.getContainedKinds()) {
-            jsonGenerator.writeString(rowKind.name());
+            if (Objects.requireNonNull(rowKind) == RowKind.DELETE

Review Comment:
   ```suggestion
               if (rowKind == RowKind.DELETE
   ```
   Why should this be null?



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to