private void parseAlterTableSplit(OracleAlterTableStatement stmt) {
lexer.nextToken();
if (identifierEquals("PARTITION")) {
lexer.nextToken();
OracleAlterTableSplitPartition item = new OracleAlterTableSplitPartition();
item.setName(this.exprParser.name());
if (identifierEquals("AT")) {
lexer.nextToken();
accept(Token.LPAREN);
this.exprParser.exprList(item.getAt());
accept(Token.RPAREN);
} else {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
}
if (lexer.token() == Token.INTO) {
lexer.nextToken();
accept(Token.LPAREN);
for (;;) {
NestedTablePartitionSpec spec = new NestedTablePartitionSpec();
acceptIdentifier("PARTITION");
spec.setPartition(this.exprParser.name());
for (;;) {
if (lexer.token() == Token.TABLESPACE) {
lexer.nextToken();
SQLName tablespace = this.exprParser.name();
spec.getSegmentAttributeItems().add(new TableSpaceItem(tablespace));
continue;
} else if (identifierEquals("PCTREE")) {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("PCTUSED")) {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("INITRANS")) {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("STORAGE")) {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("LOGGING")) {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("NOLOGGING")) {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
} else if (identifierEquals("FILESYSTEM_LIKE_LOGGING")) {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
}
break;
}
item.getInto().add(spec);
if (lexer.token() == Token.COMMA) {
lexer.nextToken();
continue;
}
break;
}
accept(Token.RPAREN);
}
if (lexer.token() == Token.UPDATE) {
lexer.nextToken();
acceptIdentifier("INDEXES");
UpdateIndexesClause updateIndexes = new UpdateIndexesClause();
item.setUpdateIndexes(updateIndexes);
}
stmt.getItems().add(item);
} else {
throw new ParserException("TODO : " + lexer.token() + " " + lexer.stringVal());
}