Set<String> columnNames = new HashSet<String>();
for (Column column : columns) {
String columnName = column.getName();
if (columnNames.contains(columnName)) {
// error: the column name is duplicated
throw new ClusterJUserException(
local.message("ERR_Duplicate_Column",
name, indexName, columnName));
}
columnNames.add(columnName);
}