aglinxinyuan opened a new pull request, #4842:
URL: https://github.com/apache/texera/pull/4842

   ### What changes were proposed in this PR?
   
   Add `WorkflowCoreTypesSpec` covering five workflow-core domain types in 
`common/workflow-core/.../core/workflow`:
   
   - `LocationPreference`: `PreferController` / `RoundRobinPreference` are 
distinct singletons; both Serializable
   - `WorkflowSettings`: defaults (`dataTransferBatchSize = 400`, 
`outputPortsNeedingStorage = Set.empty`); custom-value round-trip
   - `WorkflowContext`: defaults equal documented constants; `var` fields can 
be reassigned
   - `PhysicalOp`:
     - `isSourceOperator` true on no inputs / false once an input port is added
     - `withLocationPreference`, `withParallelizable`, `withSuggestedWorkerNum` 
round-trip through `copy`
     - `addInputLink` succeeds; assertion failures on wrong target id and on 
unknown port
     - `addOutputLink` succeeds
     - `removeInputLink` / `removeOutputLink` drop only the matching link
     - `propagateSchema` fills outputs once all inputs are known; throws 
`IllegalArgumentException` on conflicting input schema; leaves outputs as 
`Left` when the propagation function throws
     - `isOutputLinkBlocking` reflects the source ports `blocking` flag
   - `PhysicalPlan`:
     - `getOperator`, `getSourceOperatorIds` with and without links
     - `topologicalIterator` ordering
     - `getUpstreamPhysicalOpIds`, `getUpstreamPhysicalLinks`, 
`getDownstreamPhysicalLinks`
     - `getSubPlan` only includes the requested operators and their internal 
links
     - `getPhysicalOpsOfLogicalOp` returns the matching physical ops
   
   ### Any related issues, documentation, discussions?
   
   Closes #4841
   
   ### How was this PR tested?
   
   `sbt "WorkflowCore/testOnly 
org.apache.texera.amber.core.workflow.WorkflowCoreTypesSpec"` - 31/31 tests 
pass.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 4.7)


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