String ordering = _exps[0].orderingClauses[orderIndex];
for (int i = 0; i < _exps[0].projectionClauses.length; i++)
if (ordering.equals(_exps[0].projectionClauses[i]))
return ((Object[]) resultObject)[i];
throw new InvalidStateException(_loc.get
("merged-order-with-result", q.getContext().getLanguage(),
q.getContext().getQueryString(), ordering));
}
// use the parsed ordering expression to extract the ordering value