// Run optimizer to make use of secondary sort key when possible for nested foreach
// order by and distinct. Should be done before AccumulatorOptimizer
boolean noSecKeySort = conf.getBoolean(PigConfiguration.PIG_EXEC_NO_SECONDARY_KEY, false);
if (!pc.inIllustrator && !noSecKeySort) {
SecondaryKeyOptimizerTez skOptimizer = new SecondaryKeyOptimizerTez(tezPlan);
skOptimizer.visit();
}
boolean isMultiQuery = conf.getBoolean(PigConfiguration.OPT_MULTIQUERY, true);
if (isMultiQuery) {
// reduces the number of TezOpers in the Tez plan generated