mengw15 opened a new issue, #7170:
URL: https://github.com/apache/texera/issues/7170

   ### Task Summary
   
   `WorkflowState.toLogicalPlan(targetOperatorId?: string)` 
(`agent-service/src/agent/workflow-state.ts:418-454`) declares a 
`targetOperatorId` parameter but never references it — it always builds the 
whole-graph plan from `getAllEnabledOperators()`. So `toLogicalPlan("op1")` 
returns the same plan as `toLogicalPlan()`.
   
   The only caller — `agent-service/src/agent/texera-agent.ts:534` — passes no 
argument, and the "sub-graph of a target" need is already served by 
`getSubDAG(targetOperatorId)` (`workflow-state.ts:238`, used by 
`tools/workflow-execution-tools.ts:204`).
   
   Pick one and do it:
   - **Remove** the unused parameter (likely correct — the sub-plan already 
lives in `getSubDAG`); or
   - **Honor** it — restrict the plan to the target and its upstream (e.g. 
reuse `getSubDAG`) and add a test.
   
   Confirmed on `main`: `toLogicalPlan("op1")` deep-equals `toLogicalPlan()` 
today (characterized in #7159, then dropped from that coverage PR).
   
   ### Task Type
   
   - [x] Refactor / Cleanup
   


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