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


##########
amber/src/main/python/core/util/virtual_identity.py:
##########
@@ -24,16 +24,32 @@
     ActorVirtualIdentity,
 )
 
-worker_name_pattern = re.compile(r"Worker:WF\d+-.+-(\w+)-(\d+)")
+worker_name_pattern = re.compile(r"Worker:WF(\d+)-(.+)-(\w+)-(\d+)")
 
 MATERIALIZATION_READER_ACTOR_PREFIX = "MATERIALIZATION_READER_"
 
 
 def get_worker_index(worker_id: str) -> int:
-    match = worker_name_pattern.match(worker_id)
+    match = worker_name_pattern.fullmatch(worker_id)
     if match:
-        return int(match.group(2))
-    raise ValueError("Invalid worker ID format")
+        return int(match.group(4))
+    raise ValueError(f"Invalid worker ID format: {worker_id}")
+
+
+def get_operator_id(worker_id: str) -> str:

Review Comment:
   Renamed in 0c8a7e7307. Both languages now use `getLogicalOpId` / 
`get_logical_op_id` to make the logical-vs-physical distinction explicit at the 
call site (parallels the existing Scala `getPhysicalOpId`). Migrated all 
callers + tests + docstrings. Diff: 5 files, 37 insertions / 27 deletions.



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