Examples of SettableMapObjectInspector


Examples of org.apache.hadoop.hive.serde2.objectinspector.SettableMapObjectInspector

        toSoi.setStructFieldData(to, toFields.get(i), converted);
      }
      return to;
    case MAP:
      MapObjectInspector fromMoi = (MapObjectInspector) fromOi;
      SettableMapObjectInspector toMoi = (SettableMapObjectInspector) toOi;
      to = toMoi.create(); // do not reuse
      for (Map.Entry<?, ?> entry : fromMoi.getMap(from).entrySet()) {
        Object convertedKey = convert(entry.getKey(),
            fromMoi.getMapKeyObjectInspector(),
            toMoi.getMapKeyObjectInspector());
        Object convertedValue = convert(entry.getValue(),
            fromMoi.getMapValueObjectInspector(),
            toMoi.getMapValueObjectInspector());
        toMoi.put(to, convertedKey, convertedValue);
      }
      return to;
    case LIST:
      ListObjectInspector fromLoi = (ListObjectInspector) fromOi;
      List<?> fromList = fromLoi.getList(from);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.