Skip to content

Commit

Permalink
https://github.com/JSQLParser/JSqlParser/issues/1022
Browse files Browse the repository at this point in the history
  • Loading branch information
gitmotte committed Jul 26, 2020
1 parent b66e0ee commit 7a0ac5b
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.List;
import java.util.StringTokenizer;
import org.assertj.core.api.Assertions;
import org.junit.Ignore;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
Expand Down Expand Up @@ -664,4 +665,15 @@ public void tableMovementWithAS() throws JSQLParserException {
String sql = "CREATE TABLE test (startdate DATE) DISABLE ROW MOVEMENT AS SELECT 1 FROM dual";
assertSqlCanBeParsedAndDeparsed(sql);
}

@Test
@Ignore(value = "https://github.com/JSQLParser/JSqlParser/issues/1022")
public void testCreateTableWithDefault() throws JSQLParserException {
// Cannot parse statement: Encountered unexpected token: \"nextval\" \"NEXTVAL\"
String createTableWithDefaults = "CREATE TABLE myschema.tableName ("
+ "id bigint NOT NULL DEFAULT nextval('myschema.mysequence'::regclass), " +
"bool_col boolean NOT NULL DEFAULT false, " +
"int_col integer NOT NULL DEFAULT 0)";
assertSqlCanBeParsedAndDeparsed(createTableWithDefaults);
}
}

0 comments on commit 7a0ac5b

Please sign in to comment.