@Override
    public Type createType(List<TypeParameter> parameters)
    {
        checkArgument(!parameters.isEmpty(), "Row type must have at least one parameter");
        checkArgument(
                parameters.stream().allMatch(parameter -> parameter.getKind() == ParameterKind.NAMED_TYPE),
                "Expected only named types as a parameters, got %s",
                parameters);

        List<RowType.Field> fields = parameters.stream()
                .map(TypeParameter::getNamedType)
                .map(parameter -> new RowType.Field(parameter.getName().map(RowFieldName::getName), parameter.getType(), parameter.getName().map(RowFieldName::isDelimited).orElse(false)))
                .collect(toList());

        return RowType.from(fields);
    }
@Test
    public void testTypeSignatureRoundTrip()
    {
        FunctionAndTypeManager functionAndTypeManager = createTestFunctionAndTypeManager();
        TypeSignature typeSignature = new TypeSignature(
                ROW,
                TypeSignatureParameter.of(new NamedTypeSignature(Optional.of(new RowFieldName("col1", false)), new TypeSignature(BIGINT))),
                TypeSignatureParameter.of(new NamedTypeSignature(Optional.of(new RowFieldName("col2", true)), new TypeSignature(DOUBLE))));
        List<TypeParameter> parameters = typeSignature.getParameters().stream()
                .map(parameter -> TypeParameter.of(parameter, functionAndTypeManager))
                .collect(Collectors.toList());
        Type rowType = RowParametricType.ROW.createType(parameters);

        assertEquals(rowType.getTypeSignature(), typeSignature);
    }