public static ConnectSchema columnsToConnectSchema(final List<? extends SimpleColumn> columns) {
    final SqlToConnectTypeConverter converter = SchemaConverters.sqlToConnectConverter();

    final SchemaBuilder builder = SchemaBuilder.struct();
    for (final SimpleColumn column : columns) {
      final Schema colSchema = converter.toConnectSchema(column.type());
      builder.field(column.name().text(), colSchema);
    }

    return (ConnectSchema) builder.build();
  }
@Test
  public void shouldConvertColumnsToStructSchema() {
    // Given:
    final LogicalSchema schema = LogicalSchema.builder()
        .valueColumn(ColumnName.of("Vic"), DOUBLE)
        .valueColumn(ColumnName.of("Bob"), BIGINT)
        .build();

    // When:
    final ConnectSchema result = ConnectSchemas.columnsToConnectSchema(schema.value());

    // Then:
    assertThat(result.type(), is(Type.STRUCT));
    assertThat(result.fields(), contains(
        connectField("Vic", 0, Schema.OPTIONAL_FLOAT64_SCHEMA),
        connectField("Bob", 1, Schema.OPTIONAL_INT64_SCHEMA)
    ));
  }