/** change pointers to point to data in given buffer, this * method allows to defined specific column to load */ public void loadColumns(int selectedCol, ByteBuffer buf) { int pos = buf.position(); int len = info.codeSystem.codeLength(selectedCol, buf); cols[selectedCol].reset(buf.array(), buf.arrayOffset() + pos, len); }
/** * Change pointers to point to data in given buffer, UNLIKE deserialize * @param selectedCols positions of column to load * @param buf buffer containing continuous data of selected columns */ public void loadColumns(Iterable<Integer> selectedCols, ByteBuffer buf) { int pos = buf.position(); for (int c : selectedCols) { int len = info.codeSystem.codeLength(c, buf); cols[c].reset(buf.array(), buf.arrayOffset() + pos, len); pos += len; buf.position(pos); } }
public void loadColumnsFromColumnBlocks(ImmutableBitSet[] selectedColumnBlocks, ImmutableBitSet selectedCols, ByteBuffer buf) { int pos = buf.position(); for (ImmutableBitSet selectedColBlock : selectedColumnBlocks) { for (int i = 0; i < selectedColBlock.trueBitCount(); i++) { int c = selectedColBlock.trueBitAt(i); int len = info.codeSystem.codeLength(c, buf); if (selectedCols.get(c)) { cols[c].reset(buf.array(), buf.arrayOffset() + pos, len); } pos += len; buf.position(pos); } } }
/** change pointers to point to data in given buffer, this * method allows to defined specific column to load */ public void loadColumns(int selectedCol, ByteBuffer buf) { int pos = buf.position(); int len = info.codeSystem.codeLength(selectedCol, buf); cols[selectedCol].reset(buf.array(), buf.arrayOffset() + pos, len); }
/** * Change pointers to point to data in given buffer, UNLIKE deserialize * @param selectedCols positions of column to load * @param buf buffer containing continuous data of selected columns */ public void loadColumns(Iterable<Integer> selectedCols, ByteBuffer buf) { int pos = buf.position(); for (int c : selectedCols) { int len = info.codeSystem.codeLength(c, buf); cols[c].reset(buf.array(), buf.arrayOffset() + pos, len); pos += len; buf.position(pos); } }
public void loadColumnsFromColumnBlocks(ImmutableBitSet[] selectedColumnBlocks, ImmutableBitSet selectedCols, ByteBuffer buf) { int pos = buf.position(); for (ImmutableBitSet selectedColBlock : selectedColumnBlocks) { for (int i = 0; i < selectedColBlock.trueBitCount(); i++) { int c = selectedColBlock.trueBitAt(i); int len = info.codeSystem.codeLength(c, buf); if (selectedCols.get(c)) { cols[c].reset(buf.array(), buf.arrayOffset() + pos, len); } pos += len; buf.position(pos); } } }