/** Columns with no ID assigned yet. */
final List<ColumnLayout> unassigned = Lists.newArrayList();
final Iterator<ColumnDesc> itColumnDesc = familyDesc.getColumns().iterator();
while (itColumnDesc.hasNext()) {
final ColumnDesc columnDesc = itColumnDesc.next();
final boolean isRename = (columnDesc.getRenamedFrom() != null);
final String refCName = isRename ? columnDesc.getRenamedFrom() : columnDesc.getName();
columnDesc.setRenamedFrom(null);
if (isRename && (reference == null)) {
throw new InvalidLayoutException(String.format(
"Invalid renaming: cannot find reference family for column '%s:%s'.",
getName(), refCName));
}
final ColumnLayout refCLayout =
(reference != null) ? reference.getColumnMap().get(refCName) : null;
if (isRename && (refCLayout == null)) {
throw new InvalidLayoutException(String.format(
"Invalid renaming: cannot find column '%s:%s' in reference family.",
getName(), refCName));
}
final ColumnId refCId = refCIdMap.remove(refCName);
if (columnDesc.getDelete()) {
if (refCId == null) {
throw new InvalidLayoutException(String.format(
"Deleted column '%s:%s' does not exist in reference layout.",
mDesc.getName(), refCName));
}