presto-main/src/main/java/io/prestosql/operator/aggregation/MergeHyperLogLogAggregation.java/MergeHyperLogLogAggregation/merge
class MergeHyperLogLogAggregation:    private static void merge(@AggregationState HyperLogLogState state, HyperLogLog input)
    {
        HyperLogLog previous = state.getHyperLogLog();
        if (previous == null) {
            state.setHyperLogLog(input);
            state.addMemoryUsage(input.estimatedInMemorySize());
        }
        else {
            state.addMemoryUsage(-previous.estimatedInMemorySize());
            previous.mergeWith(input);
            state.addMemoryUsage(previous.estimatedInMemorySize());
        }
    }