private static FieldValue asCollection(DataType type, List<FieldValue> values) {
        if (type instanceof ArrayDataType) {
            return asArray((ArrayDataType)type, values);
        } else if (type instanceof WeightedSetDataType) {
            return asWset((WeightedSetDataType)type, values);
        } else {
            throw new UnsupportedOperationException(type.getName());
        }
    }
We're either concatenating strings, or collections.
indexinglanguage/src/main/java/com/yahoo/vespa/indexinglanguage/expressions/CatExpression.java