Source:
<code>private void alter_table_core(final String catName, final String dbname, final String name, final Table newTable, final EnvironmentContext envContext) throws InvalidOperationException, MetaException { startFunction("alter_table", ": " + getCatalogQualifiedTableName(catName, dbname, name) + " newtbl=" + newTable.getTableName()); if (newTable.getParameters() == null || newTable.getParameters().get(hive_metastoreConstants.DDL_TIME) == null) { newTable.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(System .currentTimeMillis() / 1000)); } if (newTable.getSd() != null) { String newLocation = newTable.getSd().getLocation(); if (org.apache.commons.lang.StringUtils.isNotEmpty(newLocation)) { Path tblPath = wh.getDnsPath(new Path(newLocation)); newTable.getSd().setLocation(tblPath.toString()); } } if (!newTable.isSetCatName()) { newTable.setCatName(catName); } boolean success = false; Exception ex = null; try { Table oldt = get_table_core(catName, dbname, name); if (!isRenameAllowed(catName, dbname, newTable.getDbName())) { <START> throw new MetaException("alter table not allowed"); <END> } firePreEvent(new PreAlterTableEvent(oldt, newTable, this)); alterHandler.alterTable(getMS(), wh, catName, dbname, name, newTable, envContext, this); success = true; } catch (NoSuchObjectException e) { ex = e; throw new InvalidOperationException(e.getMessage()); } catch (MetaException | InvalidOperationException e) { ex = e; throw e; } catch (Exception e) { ex = e; throw newMetaException(e); } finally { endFunction("alter_table", success, ex, name); } }</code><technical_language>give detailed error message source/destination Db/table names</technical_language>

Target:
private void alter_table_core(final String catName, final String dbname, final String name, final Table newTable, final EnvironmentContext envContext) throws InvalidOperationException, MetaException { startFunction("alter_table", ": " + getCatalogQualifiedTableName(catName, dbname, name) + " newtbl=" + newTable.getTableName()); if (newTable.getParameters() == null || newTable.getParameters().get(hive_metastoreConstants.DDL_TIME) == null) { newTable.putToParameters(hive_metastoreConstants.DDL_TIME, Long.toString(System .currentTimeMillis() / 1000)); } if (newTable.getSd() != null) { String newLocation = newTable.getSd().getLocation(); if (org.apache.commons.lang.StringUtils.isNotEmpty(newLocation)) { Path tblPath = wh.getDnsPath(new Path(newLocation)); newTable.getSd().setLocation(tblPath.toString()); } } if (!newTable.isSetCatName()) { newTable.setCatName(catName); } boolean success = false; Exception ex = null; try { Table oldt = get_table_core(catName, dbname, name); if (!isRenameAllowed(catName, dbname, newTable.getDbName())) { throw new MetaException("Alter table not allowed for table " + getCatalogQualifiedTableName(catName, dbname, name) + " new table = " + getCatalogQualifiedTableName(newTable)); } firePreEvent(new PreAlterTableEvent(oldt, newTable, this)); alterHandler.alterTable(getMS(), wh, catName, dbname, name, newTable, envContext, this); success = true; } catch (NoSuchObjectException e) { ex = e; throw new InvalidOperationException(e.getMessage()); } catch (MetaException | InvalidOperationException e) { ex = e; throw e; } catch (Exception e) { ex = e; throw newMetaException(e); } finally { endFunction("alter_table", success, ex, name); } }