Repository navigation
perf(workflow-compiler): index output ports when wiring links - #9632
Draft
Matthew-DWM wants to merge 1 commit into
Draft
Matthew-DWM wants to merge 1 commit into
Matthew-DWM wants to merge 1 commit into
Conversation
Contributor
Automated Reviewer SuggestionsBased on the
|
Matthew-DWM
marked this pull request as draft
November 23, 2026 17:49
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
WorkflowCompiler.expandLogicalPlanfound the source of each logical link withphysicalPlan.getPhysicalOpsOfLogicalOp(fromOp), which builds a JGraphT DAG of the whole plan so far and walks it in topological order. Every link paid for that.The compiler now records which physical op produces each
(logical op, output port)as it adds ops, and wires a link with one map lookup.Internal ports are separate keys, so the first stage of Aggregate or Hash Join, which writes to internal port 0, is never picked.
Any related issues, documentation, discussions?
Closes #9631
How was this PR tested?
WorkflowCompilerProducerLookupSpec(4 cases): links out of real Aggregate and Hash Join operators and their storage ports, an operator whose later internal link fails, a link from a missing port, and repeated links into one port. They pass on main too.sbt WorkflowCompiler/test: 91 passed. Scalafmt and Scalafix checks pass.Median editing-time compile on local machine with JDK 17, 5 JVMs × 20 runs of main and this PR alternating after warmup:
Strict mode moves the same way, and a one-link workflow is no slower.
Was this PR authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (GPT-6.2 Sol) and Claude Code (Claude Opus 5.5)