@Override protected LazyObjectBase createLazyObjectBase(ObjectInspector objectInspector) { return LazyBinaryFactory.createLazyBinaryObject(objectInspector); } }
/** * Get the key object with the index without checking parsed. * * @param index * The index into the array starting from 0 */ private LazyBinaryPrimitive<?, ?> uncheckedGetKey(int index) { if (keyIsNull[index]) { return null; } if (!keyInited[index]) { keyInited[index] = true; if (keyObjects[index] == null) { // Keys are always primitive keyObjects[index] = LazyBinaryFactory .createLazyBinaryPrimitiveClass((PrimitiveObjectInspector) ((MapObjectInspector) oi) .getMapKeyObjectInspector()); } keyObjects[index].init(bytes, keyStart[index], keyLength[index]); } return keyObjects[index]; }
@Override public void initialize(Configuration conf, Properties tbl) throws SerDeException { LazySerDeParameters serdeParams = new LazySerDeParameters(conf, tbl, getClass().getName()); columnNames = serdeParams.getColumnNames(); columnTypes = serdeParams.getColumnTypes(); cachedObjectInspector = LazyBinaryFactory.createColumnarStructInspector( columnNames, columnTypes); int size = columnTypes.size(); List<Integer> notSkipIDs = new ArrayList<Integer>(); if (conf == null || ColumnProjectionUtils.isReadAllColumns(conf)) { for (int i = 0; i < size; i++ ) { notSkipIDs.add(i); } } else { notSkipIDs = ColumnProjectionUtils.getReadColumnIDs(conf); } cachedLazyStruct = new LazyBinaryColumnarStruct(cachedObjectInspector, notSkipIDs); super.initialize(size); }
.getLazyBinaryObjectInspectorFromTypeInfo(rowTypeInfo); cachedLazyBinaryStruct = (LazyBinaryStruct) LazyBinaryFactory .createLazyBinaryObject(cachedObjectInspector);
/** * 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."); }
@Override public void initialize(Configuration conf, Properties tbl) throws SerDeException { LazySerDeParameters serdeParams = new LazySerDeParameters(conf, tbl, getClass().getName()); columnNames = serdeParams.getColumnNames(); columnTypes = serdeParams.getColumnTypes(); cachedObjectInspector = LazyBinaryFactory.createColumnarStructInspector( columnNames, columnTypes); int size = columnTypes.size(); List<Integer> notSkipIDs = new ArrayList<Integer>(); if (conf == null || ColumnProjectionUtils.isReadAllColumns(conf)) { for (int i = 0; i < size; i++ ) { notSkipIDs.add(i); } } else { notSkipIDs = ColumnProjectionUtils.getReadColumnIDs(conf); } cachedLazyStruct = new LazyBinaryColumnarStruct(cachedObjectInspector, notSkipIDs); super.initialize(size); }
/** * Get the value object with the index without checking parsed. * * @param index * The index into the array starting from 0 */ private LazyBinaryObject uncheckedGetValue(int index) { if (valueIsNull[index]) { return null; } if (!valueInited[index]) { valueInited[index] = true; if (valueObjects[index] == null) { valueObjects[index] = LazyBinaryFactory .createLazyBinaryObject(((MapObjectInspector) oi) .getMapValueObjectInspector()); } valueObjects[index].init(bytes, valueStart[index], valueLength[index]); } return valueObjects[index]; }
/** * Get the key object with the index without checking parsed. * * @param index * The index into the array starting from 0 */ private LazyBinaryPrimitive<?, ?> uncheckedGetKey(int index) { if (keyIsNull[index]) { return null; } if (!keyInited[index]) { keyInited[index] = true; if (keyObjects[index] == null) { // Keys are always primitive keyObjects[index] = LazyBinaryFactory .createLazyBinaryPrimitiveClass((PrimitiveObjectInspector) ((MapObjectInspector) oi) .getMapKeyObjectInspector()); } keyObjects[index].init(bytes, keyStart[index], keyLength[index]); } return keyObjects[index]; }
@Override public void initialize(Configuration conf, Properties tbl) throws SerDeException { LazySerDeParameters serdeParams = new LazySerDeParameters(conf, tbl, getClass().getName()); columnNames = serdeParams.getColumnNames(); columnTypes = serdeParams.getColumnTypes(); cachedObjectInspector = LazyBinaryFactory.createColumnarStructInspector( columnNames, columnTypes); int size = columnTypes.size(); List<Integer> notSkipIDs = new ArrayList<Integer>(); if (conf == null || ColumnProjectionUtils.isReadAllColumns(conf)) { for (int i = 0; i < size; i++ ) { notSkipIDs.add(i); } } else { notSkipIDs = ColumnProjectionUtils.getReadColumnIDs(conf); } cachedLazyStruct = new LazyBinaryColumnarStruct(cachedObjectInspector, notSkipIDs); super.initialize(size); }
field = LazyBinaryFactory.createLazyBinaryObject(uoi.getObjectInspectors().get(tag));
/** * Get the key object with the index without checking parsed. * * @param index * The index into the array starting from 0 */ private LazyBinaryPrimitive<?, ?> uncheckedGetKey(int index) { if (keyIsNull[index]) { return null; } if (!keyInited[index]) { keyInited[index] = true; if (keyObjects[index] == null) { // Keys are always primitive keyObjects[index] = LazyBinaryFactory .createLazyBinaryPrimitiveClass((PrimitiveObjectInspector) ((MapObjectInspector) oi) .getMapKeyObjectInspector()); } keyObjects[index].init(bytes, keyStart[index], keyLength[index]); } return keyObjects[index]; }
@Override public void initialize(Configuration conf, Properties tbl) throws SerDeException { LazySerDeParameters serdeParams = new LazySerDeParameters(conf, tbl, getClass().getName()); columnNames = serdeParams.getColumnNames(); columnTypes = serdeParams.getColumnTypes(); cachedObjectInspector = LazyBinaryFactory.createColumnarStructInspector( columnNames, columnTypes); int size = columnTypes.size(); List<Integer> notSkipIDs = new ArrayList<Integer>(); if (conf == null || ColumnProjectionUtils.isReadAllColumns(conf)) { for (int i = 0; i < size; i++ ) { notSkipIDs.add(i); } } else { notSkipIDs = ColumnProjectionUtils.getReadColumnIDs(conf); } cachedLazyStruct = new LazyBinaryColumnarStruct(cachedObjectInspector, notSkipIDs); super.initialize(size); }
public ReusableRowContainer() { if (internalValueOi != null) { valueStruct = (LazyBinaryStruct) LazyBinaryFactory.createLazyBinaryObject(internalValueOi); needsComplexObjectFixup = MapJoinBytesTableContainer.hasComplexObjects(internalValueOi); if (needsComplexObjectFixup) { complexObjectArrayBuffer = new ArrayList<Object>( Collections.nCopies(internalValueOi.getAllStructFieldRefs().size(), null)); } else { complexObjectArrayBuffer = null; } } else { valueStruct = null; // No rows? needsComplexObjectFixup = false; complexObjectArrayBuffer = null; } uselessIndirection = new ByteArrayRef(); hashMapResult = new BytesBytesMultiHashMap.Result(); clearRows(); }
/** * Get the key object with the index without checking parsed. * * @param index * The index into the array starting from 0 */ private LazyBinaryPrimitive<?, ?> uncheckedGetKey(int index) { if (keyIsNull[index]) { return null; } if (!keyInited[index]) { keyInited[index] = true; if (keyObjects[index] == null) { // Keys are always primitive keyObjects[index] = LazyBinaryFactory .createLazyBinaryPrimitiveClass((PrimitiveObjectInspector) ((MapObjectInspector) oi) .getMapKeyObjectInspector()); } keyObjects[index].init(bytes, keyStart[index], keyLength[index]); } return keyObjects[index]; }
@Override public void initialize(Configuration conf, Properties tbl) throws SerDeException { LazySerDeParameters serdeParams = new LazySerDeParameters(conf, tbl, getClass().getName()); columnNames = serdeParams.getColumnNames(); columnTypes = serdeParams.getColumnTypes(); cachedObjectInspector = LazyBinaryFactory.createColumnarStructInspector( columnNames, columnTypes); int size = columnTypes.size(); List<Integer> notSkipIDs = new ArrayList<Integer>(); if (conf == null || ColumnProjectionUtils.isReadAllColumns(conf)) { for (int i = 0; i < size; i++ ) { notSkipIDs.add(i); } } else { notSkipIDs = ColumnProjectionUtils.getReadColumnIDs(conf); } cachedLazyStruct = new LazyBinaryColumnarStruct(cachedObjectInspector, notSkipIDs); super.initialize(size); }
/** * Get the element without checking out-of-bound index. * * @param index * index to the array element */ private Object uncheckedGetElement(int index) { if (elementIsNull[index]) { return null; } else { if (!elementInited[index]) { elementInited[index] = true; if (arrayElements[index] == null) { arrayElements[index] = LazyBinaryFactory.createLazyBinaryObject((oi) .getListElementObjectInspector()); } arrayElements[index].init(bytes, elementStart[index], elementLength[index]); } } return arrayElements[index].getObject(); }
/** * Get the key object with the index without checking parsed. * * @param index * The index into the array starting from 0 */ private LazyBinaryPrimitive<?, ?> uncheckedGetKey(int index) { if (keyIsNull[index]) { return null; } if (!keyInited[index]) { keyInited[index] = true; if (keyObjects[index] == null) { // Keys are always primitive keyObjects[index] = LazyBinaryFactory .createLazyBinaryPrimitiveClass((PrimitiveObjectInspector) ((MapObjectInspector) oi) .getMapKeyObjectInspector()); } keyObjects[index].init(bytes, keyStart[index], keyLength[index]); } return keyObjects[index]; }
public ReusableRowContainer() { if (internalValueOi != null) { valueStruct = (LazyBinaryStruct) LazyBinaryFactory.createLazyBinaryObject(internalValueOi); needsComplexObjectFixup = hasComplexObjects(internalValueOi); if (needsComplexObjectFixup) { complexObjectArrayBuffer = new ArrayList<Object>( Collections.nCopies(internalValueOi.getAllStructFieldRefs().size(), null)); } else { complexObjectArrayBuffer = null; } } else { valueStruct = null; // No rows? needsComplexObjectFixup = false; complexObjectArrayBuffer = null; } uselessIndirection = new ByteArrayRef(); hashMapResult = new BytesBytesMultiHashMap.Result(); clearRows(); }
/** * Get the key object with the index without checking parsed. * * @param index * The index into the array starting from 0 */ private LazyBinaryPrimitive<?, ?> uncheckedGetKey(int index) { if (keyIsNull[index]) { return null; } if (!keyInited[index]) { keyInited[index] = true; if (keyObjects[index] == null) { // Keys are always primitive keyObjects[index] = LazyBinaryFactory .createLazyBinaryPrimitiveClass((PrimitiveObjectInspector) ((MapObjectInspector) oi) .getMapKeyObjectInspector()); } keyObjects[index].init(bytes, keyStart[index], keyLength[index]); } return keyObjects[index]; }
public ReusableRowContainer() { if (internalValueOi != null) { valueStruct = (LazyBinaryStruct) LazyBinaryFactory.createLazyBinaryObject(internalValueOi); needsComplexObjectFixup = MapJoinBytesTableContainer.hasComplexObjects(internalValueOi); if (needsComplexObjectFixup) { complexObjectArrayBuffer = new ArrayList<Object>( Collections.nCopies(internalValueOi.getAllStructFieldRefs().size(), null)); } else { complexObjectArrayBuffer = null; } } else { valueStruct = null; // No rows? needsComplexObjectFixup = false; complexObjectArrayBuffer = null; } uselessIndirection = new ByteArrayRef(); hashMapResult = new BytesBytesMultiHashMap.Result(); clearRows(); }