code: public static void checkCompatible(DatasetDescriptor existing,
                                       DatasetDescriptor test) {
      checkNotChanged("format", existing.getFormat(), test.getFormat());
  
      checkNotChanged("partitioning",
          existing.isPartitioned(), test.isPartitioned());
  
      if (existing.isPartitioned()) {
        checkStrategyUpdate(
            existing.getPartitionStrategy(),
            test.getPartitionStrategy(),
            test.getSchema());
      }
  
      // check can read records written with old schema using new schema
      Schema oldSchema = existing.getSchema();
      Schema testSchema = test.getSchema();
      if (!SchemaValidationUtil.canRead(oldSchema, testSchema)) {
        throw new IncompatibleSchemaException("Schema cannot read data " +
            "written using existing schema. Schema: " + testSchema.toString(true) +
            "\nExisting schema: " + oldSchema.toString(true));
      }
  
    }
docs: Checks that the {@code existing} {@link DatasetDescriptor} is compatible
  with {@code test}.
  
  @param existing the current {@code DatasetDescriptor} for a dataset
  @param test a new {@code DatasetDescriptor} for the same dataset