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


##########
amber/src/main/python/core/models/state.py:
##########
@@ -25,13 +25,41 @@
 
 class State(dict):
     CONTENT = "content"
-    SCHEMA = Schema(raw_schema={CONTENT: "STRING"})
+    # Loop-control bookkeeping owned by the worker runtime, NOT user state -- 
it
+    # never appears in the content JSON. In memory it rides on the StateFrame
+    # envelope; it is materialized/serialized as its own column (parallel to
+    # content) by to_tuple(...). from_tuple() returns the bare State; callers
+    # that need these values read the corresponding columns off the tuple.
+    LOOP_COUNTER = "loop_counter"
+    LOOP_START_ID = "loop_start_id"
+    LOOP_START_STATE_URI = "loop_start_state_uri"

Review Comment:
   Done — dropped `loop_start_state_uri` from this PR in `9fa4d9e`. The format 
is now 3 columns (`content`, `loop_counter`, `loop_start_id`); the write 
address will be delivered to Loop End at setup in the loop PR (option 1) rather 
than carried in State. Removed the column + schema entry, the `StateFrame` 
field, the transport plumbing (sender/receiver/mat-reader, `OutputManager` 
save/emit, Scala `toTuple`), and the matching test coverage. PR description 
updated. Local checks green — Python + `StateSpec`/`ArrowUtilsSpec` pass, 
scalafmt/scalafix/black clean; `IcebergDocumentSpec` compiles and runs in CI.
   
   _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
   



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