提交 d40ab416 authored 作者: plus33's avatar plus33

* Check only for closing bracket if opening bracket was detected

上级 6278e9f6
......@@ -6073,7 +6073,7 @@ public class Parser {
command.setType(CommandInterface.ALTER_TABLE_DROP_COLUMN);
ArrayList<Column> columnsToRemove = New.arrayList();
Table table = tableIfTableExists(schema, tableName, ifTableExists);
readIf("("); // For Oracle compatibility - open bracket required
boolean openingBracketDetected = readIf("("); // For Oracle compatibility - open bracket required
do {
String columnName = readColumnIdentifier();
if (table == null) {
......@@ -6085,7 +6085,9 @@ public class Parser {
Column column = table.getColumn(columnName);
columnsToRemove.add(column);
} while (readIf(","));
readIf(")"); // For Oracle compatibility - close bracket
if (openingBracketDetected) {
read(")"); // For Oracle compatibility - close bracket
}
command.setTableName(tableName);
command.setIfTableExists(ifTableExists);
command.setColumnsToRemove(columnsToRemove);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论