apply( plan: LogicalPlan): LogicalPlan
PruneFileSourcePartitions transforms a logical query plan into a Project operator with a Filter logical operator over a "pruned"
LogicalRelation with the HadoopFsRelation of a Hive partitioned table (with a PrunedInMemoryFileIndex).
apply destructures the input logical plan into a tuple of projection and filter expressions together with a leaf logical operator.
apply resolves partition column references (by requesting the logical operator to resolve partition column attributes to concrete references in the query plan) and excludes subquery expressions.
If there are no predicates (filter expressions) left for partition pruning,
apply simply does nothing more and returns the input logical query untouched.