davidradl commented on code in PR #26683:
URL: https://github.com/apache/flink/pull/26683#discussion_r2149313798


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/CompiledPlanSerdeUtil.java:
##########
@@ -265,6 +277,49 @@ static <T> Optional<T> deserializeOptionalField(
         return Optional.empty();
     }
 
+    static <T> List<T> deserializeList(
+            ObjectNode objectNode,
+            String fieldName,
+            Class<? extends T> type,
+            ObjectCodec codec,
+            DeserializationContext ctx)
+            throws IOException {
+        return ctx.readValue(
+                traverse(objectNode.required(fieldName), codec),
+                ctx.getTypeFactory().constructCollectionType(List.class, 
type));
+    }
+
+    static <T> List<T> deserializeListOrEmpty(

Review Comment:
   I am curious when does the caller use `deserializeList(` rather than 
`deserializeMapOrEmpty(`.  I assume in the  `deserializeList(` case  ` if 
(objectNode.hasNonNull(fieldName)) {` is always true. Do we need both methods?



-- 
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