Copilot commented on code in PR #740:
URL: https://github.com/apache/wayang/pull/740#discussion_r3006685215


##########
wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java:
##########
@@ -96,10 +96,10 @@ public String toExtensiveString(boolean isStriclyOrdering) {
     }
 
     /**
-     * TODO: ExecutionPlan.toJsonList add documentation
-     * labels:documentation,todo
+     * Converts this execution plan into a list of maps, where each map 
represents an {@link ExecutionStage}.
+     * The stages are included in an order that respects their dependencies.

Review Comment:
   This Javadoc claims the returned stage list order "respects their 
dependencies", but the implementation explicitly enqueues `successor` early 
when `successor.isLoopHead()` (even if not all predecessors have been seen), 
which can violate strict dependency ordering. Please adjust the wording to 
reflect this exception (e.g., dependency-respecting/topological where possible, 
with loop heads allowed to break cycles).
   ```suggestion
        * The stages are included in an order that, where possible, respects 
their dependencies (i.e., is
        * dependency-respecting/topological), but loop-head stages may be 
scheduled early to break cycles,
        * which can cause them to appear before all of their predecessors.
   ```



##########
wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java:
##########
@@ -313,6 +313,11 @@ private void toExtensiveStringAux(ExecutionTask task, 
Set<ExecutionTask> seenTas
         }
     }
 
+    /**
+     * Converts this instance into a map that can be serialized into a JSON.

Review Comment:
   The Javadoc says "serialized into a JSON", but JSON is not countable and 
this method returns a Map (not a JSON document). Rephrase to "serialized to 
JSON" / "serialized into JSON" (or explicitly "to a JSON object" if that’s what 
is meant).
   ```suggestion
        * Converts this instance into a map that can be serialized to JSON.
   ```



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