public static int getFieldCount(DataType dataType) {
        return getFieldDataTypes(dataType).size();
    }
@Test
    void testGetFieldCount() {
        assertThat(
                        DataType.getFieldCount(
                                ROW(
                                        FIELD("c0", BOOLEAN()),
                                        FIELD("c1", DOUBLE()),
                                        FIELD("c2", INT()))))
                .isEqualTo(3);
        assertThat(
                        DataType.getFieldCount(
                                STRUCTURED(
                                        DataTypesTest.SimplePojo.class,
                                        FIELD("name", STRING()),
                                        FIELD("count", INT().notNull().bridgedTo(int.class)))))
                .isEqualTo(2);
        assertThat(DataType.getFieldCount(ARRAY(INT()))).isZero();
        assertThat(DataType.getFieldCount(INT())).isZero();
    }