public long getRetainedSizeInBytes() {
    ToLongFunction<Integer> intSizeOf = ignored -> SIZE_OF_INT;
    ToLongFunction<Long> longSizeOf = ignored -> SIZE_OF_LONG;
    return INSTANCE_SIZE
        + estimatedSizeOf(path)
        + estimatedSizeOf(columnSizes, intSizeOf, longSizeOf)
        + estimatedSizeOf(nullValueCounts, intSizeOf, longSizeOf)
        + estimatedSizeOf(nanValueCounts, intSizeOf, longSizeOf)
        + estimatedSizeOf(lowerBounds, intSizeOf, value -> value.length)
        + estimatedSizeOf(upperBounds, intSizeOf, value -> value.length)
        + (keyMetadata == null ? 0 : keyMetadata.length)
        + estimatedSizeOf(equalityFieldIds, intSizeOf)
        + estimatedSizeOf(splitOffsets, longSizeOf);
  }
Copy from trino-iceberg TrinoDeleteFile and do some change to adapt mixed-format table
amoro-format-mixed/amoro-mixed-trino/src/main/java/org/apache/amoro/trino/delete/TrinoDeleteFile.java