APISonar


org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorUtils.ObjectInspectorCopyOption.JAVA

> org > apache > hadoop > hive > serde2 > objectinspector > ObjectInspectorUtils > ObjectInspectorCopyOption > JAVA
org APIs apache APIs hadoop APIs hive APIs serde2 APIs objectinspector APIs ObjectInspectorUtils APIs ObjectInspectorCopyOption APIs JAVA APIs

Example 1
private static Object convertLazyToJava(Object o, ObjectInspector oi) {
    Object obj = ObjectInspectorUtils.copyToStandardObject(o, oi, ObjectInspectorCopyOption.JAVA);

    // for now, expose non-primitive as a string
    // TODO: expose non-primitive as a structured object while maintaining JDBC compliance
    if (obj != null && oi.getCategory() != ObjectInspector.Category.PRIMITIVE) {
      obj = obj.toString();
    }

    return obj;
  }