liujinhui1994 commented on a change in pull request #2192:
URL: https://github.com/apache/hudi/pull/2192#discussion_r521885133
##########
File path:
hudi-utilities/src/test/java/org/apache/hudi/utilities/TestSchemaPostProcessor.java
##########
@@ -45,14 +50,32 @@ public void testPostProcessor() throws IOException {
SchemaProvider provider =
UtilHelpers.wrapSchemaProviderWithPostProcessor(
UtilHelpers.createSchemaProvider(DummySchemaProvider.class.getName(),
properties, jsc),
- properties, jsc);
+ properties, jsc,null);
Schema schema = provider.getSourceSchema();
assertEquals(schema.getType(), Type.RECORD);
assertEquals(schema.getName(), "test");
assertNotNull(schema.getField("testString"));
}
+ @Test
+ public void testSparkAvro() throws IOException {
+ properties.put(Config.SCHEMA_POST_PROCESSOR_PROP,
SparkAvroPostProcessor.class.getName());
+ List<String> transformerClassNames = new ArrayList<>();
+ transformerClassNames.add(FlatteningTransformer.class.getName());
+
+ SchemaProvider provider =
+ UtilHelpers.wrapSchemaProviderWithPostProcessor(
+
UtilHelpers.createSchemaProvider(SparkAvroSchemaProvider.class.getName(),
properties, jsc),
+ properties, jsc, transformerClassNames);
+
+ Schema schema = provider.getSourceSchema();
Review comment:
Ok i will handle it
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]