aglinxinyuan commented on code in PR #4488:
URL: https://github.com/apache/texera/pull/4488#discussion_r3171385555


##########
amber/src/main/python/core/architecture/packaging/output_manager.py:
##########
@@ -248,7 +248,7 @@ def emit_state(
                         receiver,
                         (
                             StateFrame(payload)
-                            if isinstance(payload, State)
+                            if isinstance(payload, dict)

Review Comment:
   Implemented the concrete runtime type approach. State is now a minimal dict 
subclass instead of a TypeAlias, so output_manager.py can use 
isinstance(payload, State) instead of isinstance(payload, dict). This keeps the 
flush_state contract explicit: state payloads must be State, while tuple 
batches remain list[Tuple], so arbitrary dictionaries are no longer silently 
classified as StateFrame.
   
   I also wrap plain dict outputs from Python executors into State at the 
data-processor boundary to preserve UDF compatibility.



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