carloea2 commented on code in PR #8958:
URL: https://github.com/apache/texera/pull/8958#discussion_r4533297201


##########
amber/src/main/python/core/models/state.py:
##########
@@ -107,7 +111,13 @@ def _from_json_value(value: Any) -> Any:
     if isinstance(value, list):
         return [_from_json_value(inner) for inner in value]
     if isinstance(value, dict):
-        if value.get(_TYPE_MARKER) == _BYTES_TYPE:
+        marker_keys = {_TYPE_MARKER, _PAYLOAD_MARKER}
+        if set(value) == marker_keys and value.get(_TYPE_MARKER) == 
_BYTES_TYPE:
             return base64.b64decode(value[_PAYLOAD_MARKER])
+        if set(value) == marker_keys and value.get(_TYPE_MARKER) == _DICT_TYPE:
+            return {
+                key: _from_json_value(inner)
+                for key, inner in value[_PAYLOAD_MARKER].items()
+            }

Review Comment:
   The JVM codec now uses the same escaping and exact envelope matching. All 18 
StateSpec tests and 13 Python to JVM to Python round trips pass.



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