The GitHub Actions job "Required Checks" on texera.git/gh-readonly-queue/main/pr-5441-7ae9b35f12748616daf7bcc925fdde2e5def5187 has succeeded. Run started by GitHub user Yicong-Huang (triggered by Yicong-Huang).
Head commit for run: 6032413f6f1e65b6a32e53542c4668f00698ec26 / Xinyuan Lin <[email protected]> test(amber): add unit test coverage for LogicalPlan (#5441) ### What changes were proposed in this PR? Adds `LogicalPlanSpec` covering `amber/src/main/scala/org/apache/texera/workflow/LogicalPlan.scala` — the user-facing logical workflow graph case class plus its companion factory. | Surface | Pinned | | --- | --- | | Construction | `LogicalPlan(operators, links)` exposes both fields verbatim. | | `LogicalPlan.apply(LogicalPlanPojo)` | Lifts the POJO's operators + links into a `LogicalPlan`, ignoring the POJO-only `opsToViewResult` / `opsToReuseResult` fields. | | `getTopologicalOpIds` | Topological order on a linear chain; respects edge directionality across a fan-out (`a → b, a → c`) — source first, two sinks unordered in the tail. | | `getOperator` | Returns the operator with the requested id; throws `NoSuchElementException` for an unknown id. | | `getTerminalOperatorIds` | Single sink in a linear chain; every out-degree-0 operator in a fan-out plan; every operator when there are no links; empty list for an empty plan. | | `getUpstreamLinks` | Returns every link whose `toOpId` matches the argument; preserves construction order when multiple links flow into the same target; returns an empty list when nothing flows in. | | `resolveScanSourceOpFileName` | Failures with `Some(errorList)` are appended per-operator instead of throwing; with `None` the first failure rethrows; non-`ScanSourceOpDesc` operators are left untouched (no errors, no resolution). Failures are forced deterministically by pointing a `ScanSourceOpDesc` fixture at a non-existent file path. | A happy-path `resolveScanSourceOpFileName` test is intentionally omitted: `FileResolver` reaches the LakeFS / dataset service in production and is environment-dependent, so a deterministic unit test would have to mock that surface — out of scope for this spec. No production code changed; this is test-only. ### Any related issues, documentation, discussions? Closes #5438 ### How was this PR tested? ``` sbt "WorkflowExecutionService/Test/testOnly org.apache.texera.workflow.LogicalPlanSpec" # → 16 tests, all pass sbt "WorkflowExecutionService/Test/scalafmtCheck" # → clean ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Opus 4.7) Report URL: https://github.com/apache/texera/actions/runs/27473610788 With regards, GitHub Actions via GitBox
