// will be created in updater
return;
} else {
Validator.validateTableTrue(columnMetadata != null, "Cannot find column '%s' in the table '%s'", cql3ColumnName, tableName);
}
final Name realType = columnMetadata.getType().getName();
if (log.isDebugEnabled()) {
log.debug("Validate existing collection/map column {} from table {} against type {}", cql3ColumnName, tableName, realType);
}
final Name expectedValueType = toCQLType(meta.config().getCQL3ValueType());
switch (meta.type()) {
case LIST:
Validator.validateTableTrue(realType == Name.LIST,
"Column '%s' of table '%s' of type '%s' should be of type '%s' indeed", cql3ColumnName, tableName,
realType, Name.LIST);
Name realListValueType = columnMetadata.getType().getTypeArguments().get(0).getName();
Validator.validateTableTrue(realListValueType == expectedValueType,
"Column '%s' of table '%s' of type 'List<%s>' should be of type 'List<%s>' indeed", cql3ColumnName,
tableName, realListValueType, expectedValueType);
break;
case SET:
Validator.validateTableTrue(realType == Name.SET,
"Column '%s' of table '%s' of type '%s' should be of type '%s' indeed", cql3ColumnName, tableName,
realType, Name.SET);
Name realSetValueType = columnMetadata.getType().getTypeArguments().get(0).getName();
Validator.validateTableTrue(realSetValueType == expectedValueType,
"Column '%s' of table '%s' of type 'Set<%s>' should be of type 'Set<%s>' indeed", cql3ColumnName,
tableName, realSetValueType, expectedValueType);
break;
case MAP:
Validator.validateTableTrue(realType == Name.MAP,
"Column '%s' of table '%s' of type '%s' should be of type '%s' indeed", cql3ColumnName, tableName,
realType, Name.MAP);
Name expectedMapKeyType = toCQLType(meta.config().getCQL3KeyType());
Name realMapKeyType = columnMetadata.getType().getTypeArguments().get(0).getName();
Name realMapValueType = columnMetadata.getType().getTypeArguments().get(1).getName();
Validator.validateTableTrue(realMapKeyType == expectedMapKeyType,
"Column %s' of table '%s' of type 'Map<%s,?>' should be of type 'Map<%s,?>' indeed", cql3ColumnName,
tableName, realMapKeyType, expectedMapKeyType);
Validator.validateTableTrue(realMapValueType == expectedValueType,