@Override public Map<?, ?> getMap(Object data) { if (data == null) { return null; } return ((LazyBinaryMap) data).getMap(); }
/** * Create a hierarchical LazyBinaryObject based on the given typeInfo. */ public static LazyBinaryObject createLazyBinaryObject(ObjectInspector oi) { ObjectInspector.Category c = oi.getCategory(); switch (c) { case PRIMITIVE: return createLazyBinaryPrimitiveClass((PrimitiveObjectInspector) oi); case MAP: return new LazyBinaryMap((LazyBinaryMapObjectInspector) oi); case LIST: return new LazyBinaryArray((LazyBinaryListObjectInspector) oi); case STRUCT: return new LazyBinaryStruct((LazyBinaryStructObjectInspector) oi); case UNION: return new LazyBinaryUnion((LazyBinaryUnionObjectInspector) oi); } throw new RuntimeException("Hive LazyBinarySerDe Internal error."); }
adjustArraySize(mapSize);
parse(); LazyBinaryPrimitive<?, ?> lazyKey = uncheckedGetKey(i); if (lazyKey == null) { continue; LazyBinaryObject lazyValue = uncheckedGetValue(i); Object value = (lazyValue == null ? null : lazyValue.getObject()); cachedMap.put(key, value);
@Override public Object getMapValueElement(Object data, Object key) { if (data == null || key == null) { return null; } return ((LazyBinaryMap) data).getMapValueElement(key); } }
/** * Get the size of the map represented by this LazyBinaryMap. * * @return The size of the map */ public int getMapSize() { if (!parsed) { parse(); } return mapSize; } }
@Override public int getMapSize(Object data) { if (data == null) { return -1; } return ((LazyBinaryMap) data).getMapSize(); }
parse(); LazyBinaryPrimitive<?, ?> lazyKeyI = uncheckedGetKey(i); if (lazyKeyI == null) { continue; LazyBinaryObject v = uncheckedGetValue(i); return v == null ? v : v.getObject();
@Override public Object getMapValueElement(Object data, Object key) { if (data == null || key == null) { return null; } return ((LazyBinaryMap) data).getMapValueElement(key); } }
/** * Get the size of the map represented by this LazyBinaryMap. * * @return The size of the map */ public int getMapSize() { if (!parsed) { parse(); } return mapSize; } }
@Override public int getMapSize(Object data) { if (data == null) { return -1; } return ((LazyBinaryMap) data).getMapSize(); }
parse(); LazyBinaryPrimitive<?, ?> lazyKey = uncheckedGetKey(i); if (lazyKey == null) { continue; LazyBinaryObject lazyValue = uncheckedGetValue(i); Object value = (lazyValue == null ? null : lazyValue.getObject()); cachedMap.put(key, value);
Map<Object, Object> expectedMap = (Map<Object, Object>) expectedObject; if (lazyObject instanceof LazyBinaryMap) { map = ((LazyBinaryMap) lazyObject).getMap(); } else { map = (Map<Object, Object>) lazyObject;
@Override public Object getMapValueElement(Object data, Object key) { if (data == null) { return -1; } return ((LazyBinaryMap) data).getMapValueElement(key); } }
/** * Get the size of the map represented by this LazyBinaryMap. * * @return The size of the map */ public int getMapSize() { if (!parsed) { parse(); } return mapSize; } }
@Override public int getMapSize(Object data) { if (data == null) { return -1; } return ((LazyBinaryMap) data).getMapSize(); }
/** * Create a hierarchical LazyBinaryObject based on the given typeInfo. */ public static LazyBinaryObject createLazyBinaryObject(ObjectInspector oi) { ObjectInspector.Category c = oi.getCategory(); switch (c) { case PRIMITIVE: return createLazyBinaryPrimitiveClass((PrimitiveObjectInspector) oi); case MAP: return new LazyBinaryMap((LazyBinaryMapObjectInspector) oi); case LIST: return new LazyBinaryArray((LazyBinaryListObjectInspector) oi); case STRUCT: return new LazyBinaryStruct((LazyBinaryStructObjectInspector) oi); } throw new RuntimeException("Hive LazyBinarySerDe Internal error."); }
parse(); LazyBinaryPrimitive<?, ?> lazyKey = uncheckedGetKey(i); if (lazyKey == null) { continue; LazyBinaryObject lazyValue = uncheckedGetValue(i); Object value = (lazyValue == null ? null : lazyValue.getObject()); cachedMap.put(key, value);
actualValue = decodeRecordReaderMap(type, ((LazyBinaryMap) actualValue).getMap());