}
private CreateView parseCreateView(boolean force, boolean orReplace) {
boolean ifNotExists = readIfNoExists();
String viewName = readIdentifierWithSchema();
CreateView command = new CreateView(session, getSchema());
this.createView = command;
command.setViewName(viewName);
command.setIfNotExists(ifNotExists);
command.setComment(readCommentIf());
command.setOrReplace(orReplace);
command.setForce(force);
if (readIf("(")) {
String[] cols = parseColumnList();
command.setColumnNames(cols);
}
String select = StringUtils.fromCacheOrNew(sqlCommand.substring(parseIndex));
read("AS");
try {
Query query = parseSelect();
query.prepare();
command.setSelect(query);
} catch (DbException e) {
if (force) {
command.setSelectSQL(select);
while (currentTokenType != END) {
read();
}
} else {
throw e;