@@ -0,0 +1,2687 @@
+/* This file is part of VoltDB.%0A * Copyright (C) 2008-2014 VoltDB Inc.%0A *%0A * Permission is hereby granted, free of charge, to any person obtaining%0A * a copy of this software and associated documentation files (the%0A * %22Software%22), to deal in the Software without restriction, including%0A * without limitation the rights to use, copy, modify, merge, publish,%0A * distribute, sublicense, and/or sell copies of the Software, and to%0A * permit persons to whom the Software is furnished to do so, subject to%0A * the following conditions:%0A *%0A * The above copyright notice and this permission notice shall be%0A * included in all copies or substantial portions of the Software.%0A *%0A * THE SOFTWARE IS PROVIDED %22AS IS%22, WITHOUT WARRANTY OF ANY KIND,%0A * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF%0A * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.%0A * IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR%0A * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,%0A * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR%0A * OTHER DEALINGS IN THE SOFTWARE.%0A */%0A%0Apackage org.voltdb;%0A%0Aimport org.voltdb.VoltDB.Configuration;%0Aimport org.voltdb.client.ProcCallException;%0Aimport org.voltdb.compiler.VoltProjectBuilder;%0Aimport org.voltdb.utils.MiscUtils;%0A%0Apublic class TestAdhocAlterTable extends AdhocDDLTestBase %7B%0A%0A    public void testBasicAlterTable() throws Exception%0A    %7B%0A        String pathToCatalog = Configuration.getPathToCatalogForTest(%22adhocddl.jar%22);%0A        String pathToDeployment = Configuration.getPathToCatalogForTest(%22adhocddl.xml%22);%0A%0A        VoltProjectBuilder builder = new VoltProjectBuilder();%0A        builder.addLiteralSchema(%0A                %22create table FOO (%22+%0A                %22ID integer,%22 +%0A                %22VAL bigint%22 +%0A                %22);%22%0A                );%0A        builder.addPartitionInfo(%22FOO%22, %22ID%22);%0A        boolean success = builder.compile(pathToCatalog, 2, 1, 0);%0A        assertTrue(%22Schema compilation failed%22, success);%0A        MiscUtils.copyFile(builder.getPathToDeployment(), pathToDeployment);%0A%0A        VoltDB.Configuration config = new VoltDB.Configuration();%0A        config.m_pathToCatalog = pathToCatalog;%0A        config.m_pathToDeployment = pathToDeployment;%0A%0A        try %7B%0A            startSystem(config);%0A%0A            try %7B%0A                m_client.callProcedure(%22@AdHoc%22,%0A                        %22alter table FOO add column newcol varchar(50);%22);%0A            %7D%0A            catch (ProcCallException pce) %7B%0A                fail(%22Alter table to add column should have succeeded%22);%0A            %7D%0A        %7D%0A        finally %7B%0A            teardownSystem();%0A        %7D%0A    %7D%0A%7D%0A

Add initial new test for adhoc alter table