schenksj opened a new issue, #4530:
URL: https://github.com/apache/datafusion-comet/issues/4530

   ### Problem
   
   `PlanDataInjector.injectPlanData` walks every operator in the tree against 
every registered injector:
   
   ```scala
   for (injector <- injectors if injector.canInject(op)) { ... }
   ```
   
   That is N operators x M injectors `canInject` calls, even though most 
operators in any tree are non-scan and match no injector.
   
   ### Proposed fix
   
   Add `def opStructCase: Operator.OpStructCase` to the `PlanDataInjector` 
trait and build a `Map[Operator.OpStructCase, PlanDataInjector]`. Look up by 
`op.getOpStructCase` (O(1)) and then run a single `canInject` confirm (which 
may still inspect detail fields). Non-scan operators skip the iteration 
entirely. Pure performance change -- no behavior difference.
   
   ### Relationship to the Delta integration
   
   This is an independent micro-optimization, not Delta-specific. It is being 
extracted out of the in-progress Delta Lake contrib integration branch (which 
registers a third injector) purely to keep that PR focused; there is **no 
functional dependency**. A PR will follow shortly.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to