code: private void retrieveKeys() {
          TableMetadata tableMetadata = config.fetchTableMetadata();
  
          List<ColumnMetadata> partitionKeys = tableMetadata.getPartitionKey();
          List<ColumnMetadata> clusteringKeys = tableMetadata.getClusteringColumns();
  
          List<AbstractType<?>> types = new ArrayList<>();
  
          for (ColumnMetadata key : partitionKeys) {
              String columnName = key.getName();
              BoundColumn boundColumn = new BoundColumn(columnName);
              boundColumn.validator = CellValidator.cellValidator(key.getType()).getAbstractType();
              partitionBoundColumns.add(boundColumn);
              types.add(boundColumn.validator);
          }
          for (ColumnMetadata key : clusteringKeys) {
              String columnName = key.getName();
              BoundColumn boundColumn = new BoundColumn(columnName);
              boundColumn.validator = CellValidator.cellValidator(key.getType()).getAbstractType();
              clusterColumns.add(boundColumn);
          }
  
          if (types.size() > 1) {
              keyValidator = CompositeType.getInstance(types);
          } else if (types.size() == 1) {
              keyValidator = types.get(0);
          } else {
              throw new DeepGenericException("Cannot determine if keyvalidator is composed or not, " +
                      "partitionKeys: " + partitionKeys);
          }
      }
docs: TODO check this