private Object toLazyObject(Object field, ObjectInspector fieldOI) {
    if (isPrimitive(field.getClass())) {
      return toLazyPrimitiveObject(field, fieldOI);
    } else if (fieldOI instanceof LazyListObjectInspector) {
      return toLazyListObject(field, fieldOI);
    } else if (field instanceof StandardUnion) {
      return toLazyUnionObject(field, fieldOI);
    } else if (fieldOI instanceof LazyMapObjectInspector) {
      return toLazyMapObject(field, fieldOI);
    } else {
      return field;
    }
  }
Converts the given field to a lazy object

@param field to be converted to a lazy object
@param fieldOI {@link ObjectInspector} for the given field
@return returns the converted lazy object
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroLazyObjectInspector.java