weiqingy commented on code in PR #709:
URL: https://github.com/apache/flink-agents/pull/709#discussion_r3315347863


##########
plan/src/main/java/org/apache/flink/agents/plan/serializer/ActionJsonDeserializer.java:
##########
@@ -172,8 +172,16 @@ private Object deserializePythonConfig(JsonNode node) {
             List<Object> list = new ArrayList<>();
             node.forEach(element -> 
list.add(deserializePythonConfig(element)));
             return list;
-        } else if (node.isValueNode()) {
-            return node.asText();
+        } else if (node.isNull()) {

Review Comment:
   Nice — splitting `node.asText()` into typed branches 
(`booleanValue`/`intValue`/`longValue`/`doubleValue`/`textValue`) restores the 
type information that Python-side config carries through the JSON. Pre-change, 
a Python config of `{"max_iters": 10}` would have come back as the string 
`"10"` on the Java side. Worth a callout in the PR description as an incidental 
correctness fix shipped along with the cross-language work.



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