presto-main/src/main/java/io/prestosql/operator/aggregation/minmaxby/MinMaxByNStateFactory.java/GroupedMinMaxByNState/setTypedKeyValueHeap
class GroupedMinMaxByNState:        @Override
        public void setTypedKeyValueHeap(TypedKeyValueHeap value)
        {
            TypedKeyValueHeap previous = getTypedKeyValueHeap();
            if (previous != null) {
                size -= previous.getEstimatedSize();
            }
            heaps.set(getGroupId(), value);
            size += value.getEstimatedSize();
        }