Class TopProjectVisitor

java.lang.Object
org.apache.drill.exec.planner.physical.visitor.BasePrelVisitor<Prel,Void,RuntimeException>
org.apache.drill.exec.planner.physical.visitor.TopProjectVisitor
All Implemented Interfaces:
PrelVisitor<Prel,Void,RuntimeException>

public class TopProjectVisitor extends BasePrelVisitor<Prel,Void,RuntimeException>
Adds non-trivial top project to ensure the final output field names are preserved. Such non-trivial project is needed due to Calcite's behavior of ProjectRemoveRule. It will be added under Screen/Writer operator in the physical plan if there is no other Projects under these operators, in cases like * column expansion or partition by column processing.