Class ReplaceSourceAttributes


public class ReplaceSourceAttributes extends PhysicalOptimizerRules.OptimizerRule<LeafExec>
Strips source leaf nodes down to their minimal output attributes so that InsertFieldExtraction can later add only the fields that the rest of the plan actually needs.

Handles both EsSourceExec (data node path, replaced with EsQueryExec) and ParameterizedQueryExec (lookup node path, output stripped to [_doc, _positions]).