public void testAlterDropColumn() throws Exception
{
String pathToCatalog = Configuration.getPathToCatalogForTest("adhocddl.jar");
String pathToDeployment = Configuration.getPathToCatalogForTest("adhocddl.xml");
VoltProjectBuilder builder = new VoltProjectBuilder();
builder.addLiteralSchema(
"create table FOO (" +
"PKCOL integer not null," +
"DROPME bigint, " +
"PROCCOL bigint, " +
"VIEWCOL bigint, " +
"INDEXCOL bigint, " +
"INDEX1COL bigint, " +
"INDEX2COL bigint, " +
"constraint pk_tree primary key (PKCOL)" +
");\n" +
"create procedure BAR as select PROCCOL from FOO;\n" +
"create view FOOVIEW (VIEWCOL, TOTAL) as select VIEWCOL, COUNT(*) from FOO group by VIEWCOL;\n" +
"create index FOODEX on FOO(INDEXCOL);\n" +
"create index FOO2DEX on FOO(INDEX1COL, INDEX2COL);\n" +
"create table ONECOL (" +
"SOLOCOL integer, " +
");\n" +
"create table BAZ (" +
"PKCOL1 integer not null, " +
"PKCOL2 integer not null, " +
"constraint pk_tree2 primary key (PKCOL1, PKCOL2)" +
");\n"
);
builder.setUseDDLSchema(true);
boolean success = builder.compile(pathToCatalog, 2, 1, 0);
assertTrue("Schema compilation failed", success);
MiscUtils.copyFile(builder.getPathToDeployment(), pathToDeployment);
VoltDB.Configuration config = new VoltDB.Configuration();
config.m_pathToCatalog = pathToCatalog;
config.m_pathToDeployment = pathToDeployment;