// verified when / if the update procedure runs in order to verify
// catalogs only move forward
retval.expectedCatalogVersion = context.catalogVersion;
// compute the diff in StringBuilder
CatalogDiffEngine diff = new CatalogDiffEngine(context.catalog, newCatalog);
if (!diff.supported()) {
retval.errorMsg = "The requested catalog change(s) are not supported:\n" + diff.errors();
return retval;
}
// since diff commands can be stupidly big, compress them here
retval.encodedDiffCommands = Encoder.compressAndBase64Encode(diff.commands());
retval.tablesThatMustBeEmpty = diff.tablesThatMustBeEmpty();
retval.reasonsForEmptyTables = diff.reasonsWhyTablesMustBeEmpty();
retval.requiresSnapshotIsolation = diff.requiresSnapshotIsolation();
retval.worksWithElastic = diff.worksWithElastic();
}
catch (Exception e) {
String msg = "Unexpected error in adhoc or catalog update: " + e.getClass() + ", " +
e.getMessage();
compilerLog.warn(msg, e);