presto-orc/src/main/java/io/prestosql/orc/writer/SliceDictionaryColumnWriter.java/SliceDictionaryColumnWriter/getRetainedBytes
class SliceDictionaryColumnWriter:    @Override
    public long getRetainedBytes()
    {
        long retainedBytes = INSTANCE_SIZE +
                values.sizeOf() +
                dataStream.getRetainedBytes() +
                presentStream.getRetainedBytes() +
                dictionaryDataStream.getRetainedBytes() +
                dictionaryLengthStream.getRetainedBytes() +
                dictionary.getRetainedSizeInBytes() +
                (directColumnWriter == null ? 0 : directColumnWriter.getRetainedBytes());

        for (DictionaryRowGroup rowGroup : rowGroups) {
            retainedBytes += rowGroup.getColumnStatistics().getRetainedSizeInBytes();
        }
        return retainedBytes;
    }