You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2020/11/19 01:25:37 UTC

[GitHub] [incubator-gobblin] shirshanka commented on a change in pull request #3153: GOBBLIN-1316: Copy field and schema level properties when switching namespace in a schema

shirshanka commented on a change in pull request #3153:
URL: https://github.com/apache/incubator-gobblin/pull/3153#discussion_r526531121



##########
File path: gobblin-utility/src/main/java/org/apache/gobblin/util/AvroUtils.java
##########
@@ -781,11 +781,19 @@ public static Schema switchNamespace(Schema schema, Map<String, String> namespac
           for (Schema.Field oldField : schema.getFields()) {
             Field newField = new Field(oldField.name(), switchNamespace(oldField.schema(), namespaceOverride), oldField.doc(),
                 oldField.defaultValue(), oldField.order());
+            // Copy field level properties
+            for (Map.Entry<String, JsonNode> prop : oldField.getJsonProps().entrySet()) {

Review comment:
       Use the already defined copyFieldProperties method? 




----------------------------------------------------------------
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:
users@infra.apache.org