@Test public void testOverrideColumnMapping() { ColumnMapping desc = new ColumnMapping.Builder() .column("field1", "override", "field1") .counter("version", "override", "version").build(); AvroEntitySchema avroEntitySchema = parser.parseEntitySchema(entitySchema, desc); desc = avroEntitySchema.getColumnMappingDescriptor(); assertEquals(2, desc.getFieldMappings().size()); assertEquals(FieldMapping.MappingType.COLUMN, desc.getFieldMapping("field1") .getMappingType()); assertEquals(FieldMapping.MappingType.COUNTER, desc.getFieldMapping("version") .getMappingType()); }
@Override public AvroEntitySchema parseEntitySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroEntitySchema( descriptor.getSchema(), rawSchema, descriptor.getColumnMapping()); }
AvroKeyEntitySchemaParser implements
    KeyEntitySchemaParser<AvroKeySchema, AvroEntitySchema> { @Override public AvroEntitySchema parseEntitySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroEntitySchema( descriptor.getSchema(), rawSchema, descriptor.getColumnMapping()); } }
AvroKeyEntitySchemaParser implements
    KeyEntitySchemaParser<AvroKeySchema, AvroEntitySchema> { @Override public AvroEntitySchema parseEntitySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroEntitySchema( descriptor.getSchema(), rawSchema, descriptor.getColumnMapping()); }  }
AvroKeyEntitySchemaParser implements
    KeyEntitySchemaParser<AvroKeySchema, AvroEntitySchema> { @Override public AvroEntitySchema parseEntitySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroEntitySchema( descriptor.getSchema(), rawSchema, descriptor.getColumnMapping()); }  @Override AvroKeySchema parseKeySchema(String rawSchema); @Override AvroKeySchema parseKeySchema(String rawSchema,
      PartitionStrategy partitionStrategy); @Override AvroEntitySchema parseEntitySchema(String rawSchema); @Override AvroEntitySchema parseEntitySchema(String rawSchema,
      ColumnMapping columnMapping); }
AvroKeyEntitySchemaParser implements
    KeyEntitySchemaParser<AvroKeySchema, AvroEntitySchema> { @Override public AvroEntitySchema parseEntitySchema(String rawSchema) { DatasetDescriptor descriptor = new DatasetDescriptor.Builder() .schemaLiteral(rawSchema) .build(); return new AvroEntitySchema( descriptor.getSchema(), rawSchema, descriptor.getColumnMapping()); }  @Override AvroKeySchema parseKeySchema(String rawSchema); @Override AvroKeySchema parseKeySchema(String rawSchema,
      PartitionStrategy partitionStrategy); @Override AvroEntitySchema parseEntitySchema(String rawSchema); @Override AvroEntitySchema parseEntitySchema(String rawSchema,
      ColumnMapping columnMapping);  }