arjun4084346 commented on a change in pull request #2800: [GOBBLIN-933] add 
support for array of unions in json schema_new
URL: https://github.com/apache/incubator-gobblin/pull/2800#discussion_r344320958
 
 

 ##########
 File path: 
gobblin-core/src/main/java/org/apache/gobblin/converter/avro/JsonElementConversionWithAvroSchemaFactory.java
 ##########
 @@ -210,4 +215,115 @@ public Schema schema() {
       return this.schema;
     }
   }
-}
+
+  /**
+   * A converter to convert Union type to avro
+   * Here it will try all the possible converters for one type, for example, 
to convert an int value, it will try all Number converters
+   * until meet the first workable one.
+   * So a known bug here is there's no guarantee on preserving precision from 
Json to Avro type as the exact type information is clear from JsonElement
+   * We're doing this since there is no way to determine what exact type it is 
for a JsonElement
 
 Review comment:
   +1

----------------------------------------------------------------
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

Reply via email to