etseidl commented on code in PR #7323:
URL: https://github.com/apache/arrow-rs/pull/7323#discussion_r2012823766


##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -558,15 +559,20 @@ impl ArrowColumnChunk {
 /// let col_writers = get_column_writers(&parquet_schema, &props, 
&schema).unwrap();
 ///
 /// // Spawn a worker thread for each column
-/// // This is for demonstration purposes, a thread-pool e.g. rayon or tokio, 
would be better
+/// //
+/// // Note: This is for demonstration purposes, a thread-pool e.g. rayon or 
tokio, would be better
+/// // iterator is a tuple of (thread handle, send channel)

Review Comment:
   ```suggestion
   /// // Note: This is for demonstration purposes, a thread-pool e.g. rayon or 
tokio, would be better.
   /// // The `map` produces an iterator of type `tuple of (thread handle, send 
channel)`.
   ```
   Or better to say "workers" is a vector of tuples... 🤷 



##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -529,18 +529,19 @@ impl ArrowColumnChunk {
 
 /// Encodes [`ArrowLeafColumn`] to [`ArrowColumnChunk`]
 ///
-/// Note: This is a low-level interface for applications that require 
fine-grained control
-/// of encoding, see [`ArrowWriter`] for a higher-level interface
+/// Note: This is a low-level interface for applications that require
+/// fine-grained control of encoding such as encoding using multiple threads,

Review Comment:
   ```suggestion
   /// fine-grained control of encoding (e.g. encoding using multiple threads),
   ```



##########
parquet/src/arrow/arrow_writer/mod.rs:
##########
@@ -575,33 +581,40 @@ impl ArrowColumnChunk {
 ///
 /// // Create parquet writer
 /// let root_schema = parquet_schema.root_schema_ptr();
-/// let mut out = Vec::with_capacity(1024); // This could be a File
-/// let mut writer = SerializedFileWriter::new(&mut out, root_schema, 
props.clone()).unwrap();
+/// // write to memory in the example, but this could be a File
+/// let mut out = Vec::with_capacity(1024);
+/// let mut writer = SerializedFileWriter::new(&mut out, root_schema, 
props.clone())
+///   .unwrap();
 ///
 /// // Start row group
-/// let mut row_group = writer.next_row_group().unwrap();
+/// let mut row_group_writer: SerializedRowGroupWriter<'_, _> = writer

Review Comment:
   ❤️ I like making this explicit



-- 
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