public static int getFieldCount(LogicalType logicalType) {
        return logicalType.accept(FIELD_COUNT_EXTRACTOR);
    }
@Test
    void testFieldCountExtraction() {
        DataType dataType = ROW(FIELD("f0", INT()), FIELD("f1", STRING()));
        assertThat(LogicalTypeChecks.getFieldCount(dataType.getLogicalType())).isEqualTo(2);
    }