Object value = ((ConstantExpression)expression).getValue();
if ((value instanceof Long) || (value instanceof Integer) ||
(value instanceof Short) || (value instanceof Byte)) {
int i = ((Number)value).intValue();
if ((i <= 0) || (i > projects.size()))
throw new OrderGroupByIntegerOutOfRange(which, i, projects.size());
expression = (ExpressionNode)projects.get(i-1);
}
else
throw new OrderGroupByNonIntegerConstant(which, expression.getSQLsource());
}