@Override
  public boolean flushBatchedValueChunk(
      ChunkMetadataElement chunkMetadataElement,
      int subTaskId,
      AbstractCompactionFlushController flushController)
      throws IOException {
    AbstractAlignedChunkMetadata alignedChunkMetadata =
        (AbstractAlignedChunkMetadata) chunkMetadataElement.chunkMetadata;
    IChunkMetadata timeChunkMetadata = alignedChunkMetadata.getTimeChunkMetadata();
    List<IChunkMetadata> valueChunkMetadatas = alignedChunkMetadata.getValueChunkMetadataList();
    List<Chunk> valueChunks = chunkMetadataElement.valueChunks;

    checkPreviousTimestamp(timeChunkMetadata.getStartTime(), subTaskId);
    if (chunkPointNumArray[subTaskId] != 0 && flushController.shouldSealChunkWriter()) {
      sealChunk(fileWriter, chunkWriters[subTaskId], subTaskId);
    }
    // if there is unsealed chunk, then deserialize the chunk
    if (chunkPointNumArray[subTaskId] != 0) {
      return false;
    }
    if (!flushController.shouldCompactChunkByDirectlyFlush(timeChunkMetadata)) {
      return false;
    }
    flushAlignedChunkToFileWriter(
        fileWriter, null, timeChunkMetadata, valueChunks, valueChunkMetadatas, subTaskId);

    lastTime[subTaskId] = timeChunkMetadata.getEndTime();
    lastTimeSet[subTaskId] = true;
    return true;
  }
Flush nonAligned chunk to tsfile directly. Return whether the chunk is flushed to tsfile
successfully or not. Return false if there is unsealed chunk or current chunk is not large
enough, else return true. Notice: if sub-value measurement is null, then flush empty value
chunk.

@throws IOException if io errors occurred
iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/compaction/execute/utils/writer/FastInnerCompactionWriter.java