lilianm commented on code in PR #8262:
URL: https://github.com/apache/arrow-rs/pull/8262#discussion_r2325192596


##########
parquet/src/arrow/async_writer/mod.rs:
##########
@@ -288,6 +288,23 @@ impl<W: AsyncFileWriter> AsyncArrowWriter<W> {
 
         Ok(())
     }
+
+    /// Create a new row group writer and return its column writers.
+    pub async fn get_column_writers(&mut self) -> 
Result<Vec<ArrowColumnWriter>> {
+        let before = self.sync_writer.flushed_row_groups().len();
+        let writers = self.sync_writer.get_column_writers()?;
+        if before != self.sync_writer.flushed_row_groups().len() {
+            self.do_write().await?;
+        }
+        Ok(writers)
+    }
+
+    /// Append the given column chunks to the file as a new row group.
+    pub async fn append_row_group(&mut self, chunks: Vec<ArrowColumnChunk>) -> 
Result<()> {
+        self.sync_writer.append_row_group(chunks)?;
+        self.do_write().await?;
+        Ok(())

Review Comment:
   Updated



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to