public boolean schemaEquals(Object obj) {
        return equals(obj) && Arrays.equals(fieldNames, ((RowTypeInfo) obj).fieldNames);
    }
@Test
    void testSchemaEquals() {
        final RowTypeInfo row1 =
                new RowTypeInfo(
                        new TypeInformation[] {
                            BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO
                        },
                        new String[] {"field1", "field2"});
        final RowTypeInfo row2 =
                new RowTypeInfo(
                        new TypeInformation[] {
                            BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO
                        },
                        new String[] {"field1", "field2"});
        assertThat(row1.schemaEquals(row2)).isTrue();

        final RowTypeInfo other1 =
                new RowTypeInfo(
                        new TypeInformation[] {
                            BasicTypeInfo.INT_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO
                        },
                        new String[] {"otherField", "field2"});
        final RowTypeInfo other2 =
                new RowTypeInfo(
                        new TypeInformation[] {
                            BasicTypeInfo.LONG_TYPE_INFO, BasicTypeInfo.STRING_TYPE_INFO
                        },
                        new String[] {"field1", "field2"});
        assertThat(row1.schemaEquals(other1)).isFalse();
        assertThat(row1.schemaEquals(other2)).isFalse();
    }