}
}
}
OrderByExpression indexColumn = getIndexColumn(indexOrdering, idx);
if (indexColumn == null && idx < nequals) {
throw new CorruptedPlanException("No index column expression for union comparison");
}
if (indexColumn != null) {
boolean matchingColumn = orderingExpressionMatches(indexColumn, targetExpression);
if (!matchingColumn && idx < nequals) {
// if we we're trying the union column, but that failed, try just treating it as equals