private void flushRowGroup(boolean finished) {
    try {
      if (recordCount > 0) {
        writer.startBlock(recordCount);
        writeStore.flush();
        flushPageStoreToWriter.invoke(writer);
        writer.endBlock();
        if (!finished) {
          startRowGroup();
        }
      }
    } catch (IOException e) {
      throw new RuntimeIOException(e, "Failed to flush row group");
    }
  }
Returns the approximate length of the output file produced by this writer.

<p>Prior to calling {@link AdaptHiveParquetWriter#close}, the result is approximate. After
calling close, the length is exact.

@return the approximate length of the output file produced by this writer or the exact length
    if this writer is closed.
amoro-format-mixed/amoro-mixed-hive/src/main/java/org/apache/iceberg/parquet/AdaptHiveParquetWriter.java