@Override protected void writeValue(ByteArrayOutputStream outputStream, Slice value) { outputStream.writeSlice(value); }
@Override public void writeBlock(Block block) { checkState(!closed); checkArgument(block.getPositionCount() > 0, "Block is empty"); // record nulls for (int position = 0; position < block.getPositionCount(); position++) { presentStream.writeBoolean(!block.isNull(position)); } // record values for (int position = 0; position < block.getPositionCount(); position++) { if (!block.isNull(position)) { Slice value = type.getSlice(block, position); lengthStream.writeLong(value.length()); dataStream.writeSlice(value); statisticsBuilder.addValue(value); } } }
dictionaryLengthStream.writeLong(length); Slice value = dictionaryElements.getSlice(sortedDictionaryIndex, 0, length); dictionaryDataStream.writeSlice(value);
@Override protected void writeValue(ByteArrayOutputStream outputStream, Slice value) { outputStream.writeSlice(value); }
@Override public void writeBlock(Block block) { checkState(!closed); checkArgument(block.getPositionCount() > 0, "Block is empty"); // record nulls for (int position = 0; position < block.getPositionCount(); position++) { presentStream.writeBoolean(!block.isNull(position)); } // record values for (int position = 0; position < block.getPositionCount(); position++) { if (!block.isNull(position)) { Slice value = type.getSlice(block, position); lengthStream.writeLong(value.length()); dataStream.writeSlice(value); statisticsBuilder.addValue(value); } } }
dictionaryLengthStream.writeLong(length); Slice value = dictionaryElements.getSlice(sortedDictionaryIndex, 0, length); dictionaryDataStream.writeSlice(value);