public static boolean hasNested(LogicalType logicalType, Predicate<LogicalType> predicate) {
        final NestedTypeSearcher typeSearcher = new NestedTypeSearcher(predicate);
        return logicalType.accept(typeSearcher).isPresent();
    }
@Test
    void testHasNested() {
        final DataType dataType = ROW(FIELD("f0", INT()), FIELD("f1", STRING()));
        assertThat(
                        LogicalTypeChecks.hasNested(
                                dataType.getLogicalType(), t -> t.is(LogicalTypeRoot.VARCHAR)))
                .isTrue();

        assertThat(
                        LogicalTypeChecks.hasNested(
                                dataType.getLogicalType(), t -> t.is(LogicalTypeRoot.ROW)))
                .isTrue();

        assertThat(
                        LogicalTypeChecks.hasNested(
                                dataType.getLogicalType(), t -> t.is(LogicalTypeRoot.BOOLEAN)))
                .isFalse();
    }