jackjlli commented on a change in pull request #5746:
URL: https://github.com/apache/incubator-pinot/pull/5746#discussion_r459805384



##########
File path: 
pinot-plugins/pinot-input-format/pinot-avro-base/src/main/java/org/apache/pinot/plugin/inputformat/avro/AvroUtils.java
##########
@@ -353,16 +353,6 @@ public static Object handleMap(Map map) {
    * Handles the conversion of every field of the GenericRecord
    */
   private static Object handleGenericRecord(GenericData.Record record) {
-    List<Field> fields = record.getSchema().getFields();
-    if (fields.isEmpty()) {
-      return null;
-    }
-
-    Map<Object, Object> convertedMap = new HashMap<>();
-    for (Field field : fields) {
-      String fieldName = field.name();
-      convertedMap.put(fieldName, convert(record.get(fieldName)));
-    }
-    return convertedMap;
+    return record.get(0);

Review comment:
       This is the original code to handle SV:
   ```
     public static Object handleSingleValue(@Nullable Object value) {
       if (value == null) {
         return null;
       }
       if (value instanceof GenericData.Record) {
         return handleSingleValue(((GenericData.Record) value).get(0));
       }
       return value;
     }
   ```
   To determine whether it's SV or MV it's from the Pinot schema.
   
   And the method `handleMultiValue()` would also call `convert()` method for 
every sub-value for MV column.




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to