}
private CqlRowMetadata extractRowMetadata(Row row, Map<String, CqlColumnType> typeMap) {
// collect and count all columns
ColumnDefinitions definitions = row.getColumnDefinitions();
ImmutableList.Builder<CqlExtendedColumnName> columnsBuild = ImmutableList.builder();
CqlPartitionKey partitionKey = null;
for (int colIndex = 0; colIndex < definitions.size(); colIndex++) {
if (colIndex > config.cassandra.columnsLimit) {
LOG.debug("Reached columns limit: {}", config.cassandra.columnsLimit);
break;
}
if (row.isNull(colIndex)) {
continue;
}
DataType dataType = definitions.getType(colIndex);
String columnNameText = definitions.getName(colIndex);
CqlColumnType columnType = typeMap.get(columnNameText.toLowerCase());
if (columnType == null) {
columnType = CqlColumnType.REGULAR;
LOG.debug("Column type not found for: {} - using regular", columnNameText);
}