public static boolean isCompositeType(LogicalType logicalType) {
        if (logicalType instanceof DistinctType) {
            return isCompositeType(((DistinctType) logicalType).getSourceType());
        }

        LogicalTypeRoot typeRoot = logicalType.getTypeRoot();
        return typeRoot == STRUCTURED_TYPE || typeRoot == ROW;
    }
@Test
    void testIsCompositeTypeDistinctType() {
        DataType dataType = ROW(FIELD("f0", INT()), FIELD("f1", STRING()));
        DistinctType distinctType =
                DistinctType.newBuilder(
                                ObjectIdentifier.of("catalog", "database", "type"),
                                dataType.getLogicalType())
                        .build();

        assertThat(LogicalTypeChecks.isCompositeType(distinctType)).isTrue();
    }