public void delete(K key) {
    if (memoryMap.containsKey(key)) {
      currentInMemoryMapSize -= estimatedPayloadSize;
      memoryMap.remove(key);
    }
    diskBasedMap.ifPresent(map -> map.delete(key));
  }
Approximate memory footprint of the in-memory map.
amoro-format-iceberg/src/main/java/org/apache/amoro/utils/map/SimpleSpillableMap.java