presto-rcfile/src/main/java/io/prestosql/rcfile/binary/StringEncoding.java/StringEncoding/decodeColumn
class StringEncoding:    @Override
    public Block decodeColumn(ColumnData columnData)
    {
        int size = columnData.rowCount();
        BlockBuilder builder = type.createBlockBuilder(null, size);

        Slice slice = columnData.getSlice();
        for (int i = 0; i < size; i++) {
            int length = columnData.getLength(i);
            if (length > 0) {
                int offset = columnData.getOffset(i);
                if ((length == 1) && slice.getByte(offset) == HIVE_EMPTY_STRING_BYTE) {
                    type.writeSlice(builder, EMPTY_SLICE);
                }
                else {
                    length = calculateTruncationLength(type, slice, offset, length);
                    type.writeSlice(builder, slice.slice(offset, length));
                }
            }
            else {
                builder.appendNull();
            }
        }
        return builder.build();
    }