bvaradar commented on code in PR #6736:
URL: https://github.com/apache/hudi/pull/6736#discussion_r1127320424


##########
hudi-common/src/main/java/org/apache/hudi/avro/MercifulJsonConverter.java:
##########
@@ -246,13 +246,7 @@ private static JsonToAvroFieldProcessor 
generateFixedTypeHandler() {
     return new JsonToAvroFieldProcessor() {
       @Override
       public Pair<Boolean, Object> convert(Object value, String name, Schema 
schema) {
-        // The ObjectMapper use List to represent FixedType
-        // eg: "decimal_val": [0, 0, 14, -63, -52] will convert to 
ArrayList<Integer>
-        List<Integer> converval = (List<Integer>) value;
-        byte[] src = new byte[converval.size()];
-        for (int i = 0; i < converval.size(); i++) {
-          src[i] = converval.get(i).byteValue();
-        }
+        byte[] src = value.toString().getBytes();

Review Comment:
   @wangxianghu :Can you use ObjectMapper to convert FixedType to Json and see 
if it is represented as list. The inline comment explicitly states that this is 
the case.  So, I am worried this would break those cases. 



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to