public void merge(HyperLogLog other) {
    if (this.m != other.m) {
      throw new IllegalArgumentException(
          "Cannot merge HyperLogLog instances with different precision");
    }

    for (int i = 0; i < m; i++) {
      registers[i] = Math.max(registers[i], other.registers[i]);
    }
  }
Merges another HyperLogLog instance into this one.

@param other The other HyperLogLog instance to merge
@throws IllegalArgumentException if the precision doesn't match
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/queryengine/execution/operator/source/relational/aggregation/approximate/HyperLogLog.java