public static List<String> colTypesFromSchema(final String schema) {
    return splitAcrossOneLevelDeepComma(schema).stream()
            .map(RowUtil::removeBackTickAndKeyTrim)
            .map(RowUtil::splitAndGetSecond)
            .collect(Collectors.toList());
  }
@Test
  public void shouldGetColumnTypesFromSchema() {
    // Given
    final String schema = "`K` STRUCT<`F1` ARRAY<STRING>>, "
            + "`STR` STRING, "
            + "`LONG` BIGINT, "
            + "`DEC` DECIMAL(4, 2),"
            + "`BYTES_` BYTES, "
            + "`ARRAY` ARRAY<STRING>, "
            + "`MAP` MAP<STRING, STRING>, "
            + "`STRUCT` STRUCT<`F1` INTEGER>, "
            + "`COMPLEX` STRUCT<`DECIMAL` DECIMAL(2, 1), `STRUCT` STRUCT<`F1` STRING, `F2` INTEGER>, `ARRAY_ARRAY` ARRAY<ARRAY<STRING>>, `ARRAY_STRUCT` ARRAY<STRUCT<`F1` STRING>>, `ARRAY_MAP` ARRAY<MAP<STRING, INTEGER>>, `MAP_ARRAY` MAP<STRING, ARRAY<STRING>>, `MAP_MAP` MAP<STRING, MAP<STRING, INTEGER>>, `MAP_STRUCT` MAP<STRING, STRUCT<`F1` STRING>>>, "
            + "`TIMESTAMP` TIMESTAMP, "
            + "`DATE` DATE, "
            + "`TIME` TIME, "
            + "`HEAD` BYTES";

    // When
    final List<String> columnTypes = RowUtil.colTypesFromSchema(schema);

    // Then
    assertThat(
            columnTypes,
            contains(
                    "STRUCT<F1 ARRAY<STRING>>",
                    "STRING",
                    "BIGINT",
                    "DECIMAL(4, 2)",
                    "BYTES",
                    "ARRAY<STRING>",
                    "MAP<STRING, STRING>",
                    "STRUCT<F1 INTEGER>",
                    "STRUCT<DECIMAL DECIMAL(2, 1), STRUCT STRUCT<F1 STRING, F2 INTEGER>, ARRAY_ARRAY ARRAY<ARRAY<STRING>>, ARRAY_STRUCT ARRAY<STRUCT<F1 STRING>>, ARRAY_MAP ARRAY<MAP<STRING, INTEGER>>, MAP_ARRAY MAP<STRING, ARRAY<STRING>>, MAP_MAP MAP<STRING, MAP<STRING, INTEGER>>, MAP_STRUCT MAP<STRING, STRUCT<F1 STRING>>>",
                    "TIMESTAMP",
                    "DATE",
                    "TIME",
                    "BYTES"
            ));
  }