aglinxinyuan opened a new pull request, #5796: URL: https://github.com/apache/texera/pull/5796
### What changes were proposed in this PR? Pin behavior of three tiny abstract `LogicalOp` bases in `common/workflow-operator/`. Two of them (`MapOpDesc`, `FilterOpDesc`) carry a `runtimeReconfiguration` override that delegates to `newOpDesc.getPhysicalOp` and wraps the result in `Success((_, None))` — drift in that delegation (swapped arg order, accidental `Failure` wrap, surprise `StateTransferFunc`) would land silently. No production-code changes. | Spec | Source class | Tests | | --- | --- | --- | | `FlatMapOpDescSpec` | `FlatMapOpDesc` | 4 | | `MapOpDescSpec` | `MapOpDesc` | 6 | | `FilterOpDescSpec` | `FilterOpDesc` | 6 | All three spec files follow the `<srcClassName>Spec.scala` one-to-one convention. **Behavior pinned (per descriptor)** | Surface | Contract | | --- | --- | | Abstract-class shape | `Modifier.isAbstract(classOf[X])` | | LogicalOp inheritance | upcast compiles; `case _: LogicalOp` matches a concrete subclass | | `runtimeReconfiguration` (Map/Filter only) | delegates to `newOpDesc.getPhysicalOp(workflowId, executionId)` | | Argument isolation | `oldOpDesc.getPhysicalOp` is **not** called | | Result wrapping | returns `Success` with `(_, None)` for the `StateTransferFunc` slot | | Exception propagation | a throw from `newOpDesc.getPhysicalOp` is **not** caught — it propagates up | The specs use minimal `StubMapDesc` / `StubFilterDesc` subclasses that record every `getPhysicalOp` call so the delegation is observable end-to-end. Sentinel returns use `null.asInstanceOf[PhysicalOp]` — the production code only passes the return value to `Success(...)` without inspecting it, so the cast is safe for these tests. ### Any related issues, documentation, discussions? Closes #5793. ### How was this PR tested? Pure unit-test additions; verified locally with: - `sbt \"WorkflowOperator/testOnly org.apache.texera.amber.operator.flatmap.FlatMapOpDescSpec org.apache.texera.amber.operator.map.MapOpDescSpec org.apache.texera.amber.operator.filter.FilterOpDescSpec\"` — 16 tests, all green - `sbt \"WorkflowOperator/Test/scalafmtCheck\"` — clean - CI to confirm ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7 [1M context]) -- 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]
