private Object toLazyListObject(Object obj, ObjectInspector objectInspector) {
    if (obj == null) {
      return null;
    }

    List<?> listObj = (List<?>) obj;

    LazyArray retList = (LazyArray) LazyFactory.createLazyObject(objectInspector);

    List<Object> lazyList = retList.getList();

    ObjectInspector listElementOI =
        ((ListObjectInspector) objectInspector).getListElementObjectInspector();

    for (int i = 0; i < listObj.size(); i++) {
      lazyList.add(toLazyObject(listObj.get(i), listElementOI));
    }

    return retList;
  }
Convert the given object to a lazy object using the given {@link ObjectInspector}

@param obj Object to be converted to a {@link LazyObject}
@param objectInspector ObjectInspector used for the conversion
@return the created {@link LazyObject lazy object}
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroLazyObjectInspector.java