ColumnToCollectionType collectionType = metadata.comparator.collectionType(); if (!collectionType.defined.containsKey(CQL3ColumnName)) throw new org.apache.cassandra.exceptions.InvalidRequestException(String.format("Invalid collection component, %s is not a collection", UTF8Type.instance.getString(CQL3ColumnName)));
CollectionType previous = cfm.comparator.collectionType() == null ? null : cfm.comparator.collectionType().defined.get(columnName.bytes); if (previous != null && !type.isCompatibleWith(previous)) throw new InvalidRequestException(String.format("Cannot add a collection with the name %s " +