@Override public Table alterTable(String catName, String dbName, String name, Table newTable, String queryValidWriteIds) throws InvalidObjectException, MetaException { return objectStore.alterTable(catName, dbName, name, newTable, queryValidWriteIds); }
@Override public Table alterTable(String catName, String dbname, String name, Table newTable, String queryValidWriteIds) throws InvalidObjectException, MetaException { if (alterTableModifier != null) { CallerArguments args = new CallerArguments(dbname); args.tblName = name; Boolean success = alterTableModifier.apply(args); if ((success != null) && !success) { throw new MetaException("InjectableBehaviourObjectStore: Invalid alterTable operation on Catalog : " + catName + " DB: " + dbname + " table: " + name); } } return super.alterTable(catName, dbname, name, newTable, queryValidWriteIds); }
newTbl1.setOwnerType(PrincipalType.ROLE); objectStore.alterTable(DEFAULT_CATALOG_NAME, DB1, TABLE1, newTbl1, null); tables = objectStore.getTables(DEFAULT_CATALOG_NAME, DB1, "new*"); Assert.assertEquals(1, tables.size());
tbl.setOwner(tblOwner); tbl.setOwnerType(PrincipalType.ROLE); objectStore.alterTable(DEFAULT_CATALOG_NAME, dbName, tblName, tbl, null); tbl = objectStore.getTable(DEFAULT_CATALOG_NAME, dbName, tblName);