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

   ### What changes were proposed in this PR?
   `DifferenceOpExec`, `IntersectOpExec`, and `SymmetricDifferenceOpExec` each 
restated the identical two-input buffering logic: allocating two 
`mutable.HashSet[Tuple]` sets on `open()`, clearing them on `close()`, routing 
tuples from port 0 to the left set and port 1 to the right set on 
`processTuple()`, and waiting for both input ports to finish on `onFinish()`.
   
   A new abstract class, `BinarySetOpExec`, now owns this lifecycle. Subclasses 
only supply `protected def combine(leftSet: mutable.HashSet[Tuple], rightSet: 
mutable.HashSet[Tuple]): Iterator[TupleLike]`.
   
   | Surface | Pinned |
   | --- | --- |
   | `open` / `close` | allocate and clear `leftSet` and `rightSet`, reset 
`exhaustedCounter` |
   | `processTuple` | buffer port 0 into `leftSet` and port 1 into `rightSet` |
   | `onFinish` | return empty until both input ports finish, then delegate to 
`combine` |
   
   Subclasses keep their exact class names and packages.
   
   ### Any related issues, documentation, discussions?
   Closes #9206.
   
   ### How was this PR tested?
   - `sbt "WorkflowOperator/testOnly 
org.apache.texera.amber.operator.difference.* 
org.apache.texera.amber.operator.intersect.* 
org.apache.texera.amber.operator.symmetricDifference.*"`: all 39 tests across 6 
suites pass. Every test name and outcome was compared test by test against 
baseline JUnit XML reports and is identical.
   - Mutation check: breaking `exhaustedCounter == 2` to `3` in 
`BinarySetOpExec` fails 10 tests across all three executor suites; restoring 
from saved bytes returns tests to green.
   - `sbt "WorkflowOperator/scalafmtCheck" 
"WorkflowOperator/Test/scalafmtCheck" "WorkflowOperator/scalafix --check" 
"WorkflowOperator/Test/scalafix --check"`
   
   ### Was this PR authored or co-authored using generative AI tooling?
   Generated-by: Antigravity (Gemini 3.8 Flash)
   


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