List<ColumnExpression> columnExpressions = parseSelect(tokens, isDistinct, typeSystem);
Source source = parseFrom(tokens, typeSystem);
Constraint constraint = parseWhere(tokens, typeSystem, source);
// Parse the order by and limit (can be in any order) ...
List<? extends Ordering> orderings = parseOrderBy(tokens, typeSystem, source);
Limit limit = parseLimit(tokens);
if (orderings == null) parseOrderBy(tokens, typeSystem, source);
// Convert the column expressions to columns ...
List<Column> columns = new ArrayList<Column>(columnExpressions.size());
for (ColumnExpression expression : columnExpressions) {