docs: protected void checkForNonEmptyTables(String[] tablesThatMustBeEmpty,
                                            String[] reasonsForEmptyTables,
                                            SystemProcedureExecutionContext context)
      {
          assert(tablesThatMustBeEmpty != null);
          // no work to do if no tables need to be empty
          if (tablesThatMustBeEmpty.length == 0) {
              return;
          }
          assert(reasonsForEmptyTables != null);
          assert(reasonsForEmptyTables.length == tablesThatMustBeEmpty.length);
  
          // fetch the id of the tables that must be empty from the
          //  current catalog (not the new one).
          CatalogMap<Table> tables = context.getDatabase().getTables();
          List<List<String>> allTableSets = decodeTables(tablesThatMustBeEmpty);
          Map<String, Boolean> allTables = collapseSets(allTableSets);
          int[] tableIds = new int[allTables.size()];
          int i = 0;
          for (String tableName : allTables.keySet()) {
              Table table = tables.get(tableName);
              if (table == null) {
                  String msg = String.format("@UpdateCore was checking to see if table %s was empty, " +
                                             "presumably as part of a schema change, and it failed to find the table " +
                                             "in the current catalog context.", tableName);
                  throw new SpecifiedException(ClientResponse.UNEXPECTED_FAILURE, msg);
              }
              tableIds[i++] = table.getRelativeIndex();
          }
  
          // get the table stats for these tables from the EE
          final VoltTable[] s1 =
                  context.getSiteProcedureConnection().getStats(StatsSelector.TABLE,
                                                                tableIds,
                                                                false,
                                                                getTransactionTime().getTime());
          if ((s1 == null) || (s1.length == 0)) {
              String tableNames = StringUtils.join(tablesThatMustBeEmpty, ", ");
              String msg = String.format("@UpdateCore was checking to see if tables (%s) were empty ," +
                                         "presumably as part of a schema change, but failed to get the row counts " +
                                         "from the native storage engine.", tableNames);
              throw new SpecifiedException(ClientResponse.UNEXPECTED_FAILURE, msg);
          }
          VoltTable stats = s1[0];
  
          // find all empty tables and mark that they are empty.
          while (stats.advanceRow()) {
              long tupleCount = stats.getLong("TUPLE_COUNT");
              String tableName = stats.getString("TABLE_NAME");
              boolean isEmpty = true;
              if (tupleCount > 0) {
                  isEmpty = false;
              }
              allTables.put(tableName.toUpperCase(), isEmpty);
          }
  
          // Reexamine the sets of sets and see if any of them has
          // one empty element.  If not, then add the respective
          // error message to the output message
          String msg = "Unable to make requested schema change:\n";
          boolean allOk = true;
          for (int idx = 0; idx < allTableSets.size(); idx += 1) {
              List<String> tableNames = allTableSets.get(idx);
              boolean allNonEmpty = true;
              for (String tableName : tableNames) {
                  Boolean oneEmpty = allTables.get(tableName);
                  if (oneEmpty != null && oneEmpty) {
                      allNonEmpty = false;
                      break;
                  }
              }
              if (allNonEmpty) {
                  String errMsg = reasonsForEmptyTables[idx];
                  msg += errMsg + "\n";
                  allOk = false;
              }
          }
          if ( ! allOk) {
              throw new SpecifiedException(ClientResponse.GRACEFUL_FAILURE, msg);
          }
      }