@Override public String toString() { StringBuilder sb = new StringBuilder("VariableWidthBlock{"); sb.append("positionCount=").append(getPositionCount()); sb.append(", slice=").append(slice); sb.append('}'); return sb.toString(); } }
@Override public Block getRegion(int positionOffset, int length) { checkValidRegion(getPositionCount(), positionOffset, length); return new VariableWidthBlock(positionOffset + arrayOffset, length, slice, offsets, valueIsNull); }
@Override public Block copyRegion(int positionOffset, int length) { checkValidRegion(getPositionCount(), positionOffset, length); positionOffset += arrayOffset; int[] newOffsets = compactOffsets(offsets, positionOffset, length); Slice newSlice = compactSlice(slice, offsets[positionOffset], newOffsets[length]); boolean[] newValueIsNull = valueIsNull == null ? null : compactArray(valueIsNull, positionOffset, length); if (newOffsets == offsets && newSlice == slice && newValueIsNull == valueIsNull) { return this; } return new VariableWidthBlock(0, length, newSlice, newOffsets, newValueIsNull); }
if (!presentStream.nextBit()) { idsVector[i] = dictionaryBlock.getPositionCount() - 1;
@Override public String toString() { StringBuilder sb = new StringBuilder("VariableWidthBlock{"); sb.append("positionCount=").append(getPositionCount()); sb.append(", slice=").append(slice); sb.append('}'); return sb.toString(); } }
@Override public Block getRegion(int positionOffset, int length) { checkValidRegion(getPositionCount(), positionOffset, length); return new VariableWidthBlock(positionOffset + arrayOffset, length, slice, offsets, valueIsNull); }
@Override public Block copyRegion(int positionOffset, int length) { checkValidRegion(getPositionCount(), positionOffset, length); positionOffset += arrayOffset; int[] newOffsets = compactOffsets(offsets, positionOffset, length); Slice newSlice = compactSlice(slice, offsets[positionOffset], newOffsets[length]); boolean[] newValueIsNull = valueIsNull == null ? null : compactArray(valueIsNull, positionOffset, length); if (newOffsets == offsets && newSlice == slice && newValueIsNull == valueIsNull) { return this; } return new VariableWidthBlock(0, length, newSlice, newOffsets, newValueIsNull); }
if (!presentStream.nextBit()) { idsVector[i] = dictionaryBlock.getPositionCount() - 1;