From cc2970356b4d7dea9f29d27e0a37a6ce22ec4b37 Mon Sep 17 00:00:00 2001 From: empeje <11813607+empeje@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:45:35 +0200 Subject: [PATCH 1/3] Add missing documentation --- .../wayang/core/plan/executionplan/ExecutionPlan.java | 6 +++--- .../wayang/core/plan/executionplan/ExecutionStage.java | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java index 99628ce6c..ae90f1df0 100644 --- a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java +++ b/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. * - * @return + * @return a list of maps representing the execution stages */ public List toJsonList() { Counter stageActivationCounter = new Counter<>(); diff --git a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java index ced34337d..c2ad3a13c 100644 --- a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java +++ b/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 seenTas } } + /** + * Converts this instance into a map that can be serialized into a JSON. + * + * @return a map representing this instance + */ public Map toJsonMap() { HashMap jsonMap = new HashMap<>(); ArrayList operators = new ArrayList<>(); From 65a4663635288c656d06edb8b4e679ff0a7b294c Mon Sep 17 00:00:00 2001 From: Abdurrachman M <11813607+empeje@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:49:43 +0200 Subject: [PATCH 2/3] Update wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../apache/wayang/core/plan/executionplan/ExecutionStage.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java index c2ad3a13c..bde78881b 100644 --- a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java +++ b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionStage.java @@ -314,7 +314,7 @@ private void toExtensiveStringAux(ExecutionTask task, Set seenTas } /** - * Converts this instance into a map that can be serialized into a JSON. + * Converts this instance into a map that can be serialized to JSON. * * @return a map representing this instance */ From dcacd7cd8a775c6684bd0fc2faabf5fccf29a83a Mon Sep 17 00:00:00 2001 From: Abdurrachman M <11813607+empeje@users.noreply.github.com> Date: Sun, 29 Mar 2026 21:49:51 +0200 Subject: [PATCH 3/3] Update wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../apache/wayang/core/plan/executionplan/ExecutionPlan.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java index ae90f1df0..5b37f4a16 100644 --- a/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java +++ b/wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/executionplan/ExecutionPlan.java @@ -97,7 +97,9 @@ public String toExtensiveString(boolean isStriclyOrdering) { /** * 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. + * 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. * * @return a list of maps representing the execution stages */