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 testIsCompositeTypeStructuredType() {
        StructuredType logicalType =
                StructuredType.newBuilder(ObjectIdentifier.of("catalog", "database", "type"))
                        .attributes(
                                Arrays.asList(
                                        new StructuredType.StructuredAttribute(
                                                "f0", DataTypes.INT().getLogicalType()),
                                        new StructuredType.StructuredAttribute(
                                                "f1", DataTypes.STRING().getLogicalType())))
                        .build();

        List<DataType> fieldDataTypes = Arrays.asList(DataTypes.INT(), DataTypes.STRING());
        FieldsDataType dataType = new FieldsDataType(logicalType, fieldDataTypes);

        assertThat(LogicalTypeChecks.isCompositeType(dataType.getLogicalType())).isTrue();
    }