@Override public int getInt(int rowId) { if (dictionary == null) { return intData[rowId]; } else { return dictionary.decodeToInt(dictionaryIds.getDictId(rowId)); } }
@Override public byte[] getBinary(int rowId) { if (isNullAt(rowId)) return null; if (dictionary == null) { return arrayData().getBytes(getArrayOffset(rowId), getArrayLength(rowId)); } else { return dictionary.decodeToBinary(dictionaryIds.getDictId(rowId)); } }
/** * Allocates a column to store elements of `type` on or off heap. * Capacity is the initial capacity of the vector and it will grow as necessary. Capacity is * in number of elements, not number of bytes. */ public static ColumnVector allocate(int capacity, DataType type, MemoryMode mode) { if (mode == MemoryMode.OFF_HEAP) { return new OffHeapColumnVector(capacity, type); } else { return new OnHeapColumnVector(capacity, type); } }
@Override public int putByteArray(int rowId, byte[] value, int offset, int length) { int result = arrayData().appendBytes(length, value, offset); arrayOffsets[rowId] = result; arrayLengths[rowId] = length; return result; }
@Override public int putByteArray(int rowId, byte[] value, int offset, int length) { int result = arrayData().appendBytes(length, value, offset); arrayOffsets[rowId] = result; arrayLengths[rowId] = length; return result; }
@Override public long getLong(int rowId) { if (dictionary == null) { return longData[rowId]; } else { return dictionary.decodeToLong(dictionaryIds.getDictId(rowId)); } }
@Override public double getDouble(int rowId) { if (dictionary == null) { return doubleData[rowId]; } else { return dictionary.decodeToDouble(dictionaryIds.getDictId(rowId)); } }
@Override public float getFloat(int rowId) { if (dictionary == null) { return floatData[rowId]; } else { return dictionary.decodeToFloat(dictionaryIds.getDictId(rowId)); } }
@Override public byte[] getBinary(int rowId) { if (isNullAt(rowId)) return null; if (dictionary == null) { return arrayData().getBytes(getArrayOffset(rowId), getArrayLength(rowId)); } else { return dictionary.decodeToBinary(dictionaryIds.getDictId(rowId)); } }
@Override public byte getByte(int rowId) { if (dictionary == null) { return byteData[rowId]; } else { return (byte) dictionary.decodeToInt(dictionaryIds.getDictId(rowId)); } }
@Override public int putByteArray(int rowId, byte[] value, int offset, int length) { int result = arrayData().appendBytes(length, value, offset); arrayOffsets[rowId] = result; arrayLengths[rowId] = length; return result; }
@Override public long getLong(int rowId) { if (dictionary == null) { return longData[rowId]; } else { return dictionary.decodeToLong(dictionaryIds.getDictId(rowId)); } }
@Override public double getDouble(int rowId) { if (dictionary == null) { return doubleData[rowId]; } else { return dictionary.decodeToDouble(dictionaryIds.getDictId(rowId)); } }
@Override public short getShort(int rowId) { if (dictionary == null) { return shortData[rowId]; } else { return (short) dictionary.decodeToInt(dictionaryIds.getDictId(rowId)); } }
@Override public short getShort(int rowId) { if (dictionary == null) { return shortData[rowId]; } else { return (short) dictionary.decodeToInt(dictionaryIds.getDictId(rowId)); } }
@Override public byte getByte(int rowId) { if (dictionary == null) { return byteData[rowId]; } else { return (byte) dictionary.decodeToInt(dictionaryIds.getDictId(rowId)); } }
@Override public int getInt(int rowId) { if (dictionary == null) { return intData[rowId]; } else { return dictionary.decodeToInt(dictionaryIds.getDictId(rowId)); } }