public static void validateSchema(@Nonnull Schema schema,
      @Nonnull SchemaConformingTransformerConfig transformerConfig) {
    validateSchemaFieldNames(schema.getPhysicalColumnNames(), transformerConfig);

    String indexableExtrasFieldName = transformerConfig.getIndexableExtrasField();
    getAndValidateExtrasFieldType(schema, indexableExtrasFieldName);
    String unindexableExtrasFieldName = transformerConfig.getUnindexableExtrasField();
    if (null != unindexableExtrasFieldName) {
      getAndValidateExtrasFieldType(schema, indexableExtrasFieldName);
    }

    validateSchemaAndCreateTree(schema);
  }
@Test
  public void testOverlappingSchemaFields() {
    Assert.assertThrows(IllegalArgumentException.class, () -> {
      Schema schema = createDefaultSchemaBuilder().addSingleValueDimension("a.b", DataType.STRING)
          .addSingleValueDimension("a.b.c", DataType.INT).build();
      SchemaConformingTransformer.validateSchema(schema,
          new SchemaConformingTransformerConfig(INDEXABLE_EXTRAS_FIELD_NAME, null, null, null));
    });

    // This is a repeat of the previous test but with fields reversed just in case they are processed in order
    Assert.assertThrows(IllegalArgumentException.class, () -> {
      Schema schema = createDefaultSchemaBuilder().addSingleValueDimension("a.b.c", DataType.INT)
          .addSingleValueDimension("a.b", DataType.STRING).build();
      SchemaConformingTransformer.validateSchema(schema,
          new SchemaConformingTransformerConfig(INDEXABLE_EXTRAS_FIELD_NAME, null, null, null));
    });
  }