if (from.plan.getOperator(connectingLR.getOperatorKey()) == null) {
// The POLocalRearrange is sub-plan of a POSplit
rearrangePlan = PlanHelper.getLocalRearrangePlanFromSplit(from.plan, connectingLR.getOperatorKey());
}
SecondaryKeyOptimizerInfo info = SecondaryKeyOptimizerUtil.applySecondaryKeySort(rearrangePlan, to.plan);
if (info != null) {
numSortRemoved += info.getNumSortRemoved();
numDistinctChanged += info.getNumDistinctChanged();
numUseSecondaryKey += info.getNumUseSecondaryKey();
if (info.isUseSecondaryKey()) {
// Set it on the receiving vertex and the connecting edge.
to.setUseSecondaryKey(true);
inEdge.setUseSecondaryKey(true);
inEdge.setSecondarySortOrder(info.getSecondarySortOrder());
log.info("Using Secondary Key Optimization in the edge between vertex - "
+ from.getOperatorKey()
+ " and vertex - "
+ to.getOperatorKey());
}