public static long calculateAlignedChunkMetaBytesUsed(
      AbstractAlignedChunkMetadata alignedChunkMetadata) {
    if (alignedChunkMetadata == null) {
      return 0L;
    }

    final ChunkMetadata timeChunkMetadata =
        (ChunkMetadata) alignedChunkMetadata.getTimeChunkMetadata();
    final List<IChunkMetadata> valueChunkMetadataList =
        alignedChunkMetadata.getValueChunkMetadataList();

    long size = timeChunkMetadata != null ? timeChunkMetadata.getRetainedSizeInBytes() : 0;
    if (valueChunkMetadataList != null && !valueChunkMetadataList.isEmpty()) {
      for (IChunkMetadata valueChunkMetadata : valueChunkMetadataList) {
        if (valueChunkMetadata != null) {
          size += ((ChunkMetadata) valueChunkMetadata).getRetainedSizeInBytes();
        }
      }
    }

    return size;
  }
Given a row of a tablet, calculate the row count and memory cost of the pipe tablet that will
be constructed according to config.

@return left is the row count of tablet, right is the memory cost of tablet in bytes
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/PipeMemoryWeightUtil.java