tustvold commented on code in PR #1719:
URL: https://github.com/apache/arrow-rs/pull/1719#discussion_r879326505


##########
parquet/src/file/mod.rs:
##########
@@ -48,12 +48,14 @@
 //! let props = Arc::new(WriterProperties::builder().build());
 //! let file = fs::File::create(&path).unwrap();
 //! let mut writer = SerializedFileWriter::new(file, schema, props).unwrap();
-//! let mut row_group_writer = writer.next_row_group().unwrap();
-//! while let Some(mut col_writer) = row_group_writer.next_column().unwrap() {
-//!     // ... write values to a column writer
-//!     row_group_writer.close_column(col_writer).unwrap();
+//! {

Review Comment:
   It would have been highly non-trivial to do this correctly before, and with 
the lifetime change in this PR it would actually be impossible, as 
`FileWriter::next_row_group` returns a mutable borrow of `FileWriter`
   
   That being said, nothing would prevent creating a ParallelizedFileWriter, 
you just wouldn't be able to be generic over parallel and non-parallel 
implementations. I'm not sure this is actually a problem.
   
   I personally think removing these traits as part of the PR would go a long 
way to making the change easy for users to understand, the lifetime errors are 
not very obvious unless you know what you are looking for.



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