ZihanLi58 commented on a change in pull request #2925: [GOBBLIN-1080] Add
configuration to add schema creation time in converter
URL: https://github.com/apache/incubator-gobblin/pull/2925#discussion_r393322172
##########
File path:
gobblin-core-base/src/main/java/org/apache/gobblin/converter/filter/AvroProjectionConverter.java
##########
@@ -74,10 +74,15 @@ public AvroProjectionConverter init(WorkUnitState
workUnit) {
*/
@Override
public Schema convertSchema(Schema inputSchema, WorkUnitState workUnit)
throws SchemaConversionException {
+ Schema outputSchema = inputSchema;
if (this.fieldRemover.isPresent()) {
- return this.fieldRemover.get().removeFields(inputSchema);
+ outputSchema = this.fieldRemover.get().removeFields(inputSchema);
}
- return inputSchema;
+
if(workUnit.getPropAsBoolean(ConfigurationKeys.CONVERTER_AVRO_INCLUDE_SCHEMA_CREATION_TIME,
+
ConfigurationKeys.DEFAULT_CONVERTER_AVRO_INCLUDE_SCHEMA_CREATION_TIME)) {
Review comment:
my concern is that will make the change not backward compatible, and most
converter will not erase the schema prop, how about your thoughts?
----------------------------------------------------------------
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]
With regards,
Apache Git Services