public static List<DataType> getFieldDataTypes(DataType dataType) {
        final LogicalType type = dataType.getLogicalType();
        if (type.is(LogicalTypeRoot.DISTINCT_TYPE)) {
            return getFieldDataTypes(dataType.getChildren().get(0));
        } else if (isCompositeType(type)) {
            return dataType.getChildren();
        }
        return Collections.emptyList();
    }
@Test
    void testGetFieldDataTypes() {
        assertThat(
                        DataType.getFieldDataTypes(
                                ROW(
                                        FIELD("c0", BOOLEAN()),
                                        FIELD("c1", DOUBLE()),
                                        FIELD("c2", INT()))))
                .containsExactly(BOOLEAN(), DOUBLE(), INT());
        assertThat(
                        DataType.getFieldDataTypes(
                                STRUCTURED(
                                        DataTypesTest.SimplePojo.class,
                                        FIELD("name", STRING()),
                                        FIELD("count", INT().notNull().bridgedTo(int.class)))))
                .containsExactly(STRING(), INT().notNull().bridgedTo(int.class));
        assertThat(DataType.getFieldDataTypes(ARRAY(INT()))).isEmpty();
        assertThat(DataType.getFieldDataTypes(INT())).isEmpty();
    }