alamb commented on code in PR #6932: URL: https://github.com/apache/arrow-rs/pull/6932#discussion_r1901683716
########## arrow-array/src/builder/mod.rs: ########## @@ -234,6 +236,47 @@ use std::any::Any; /// .value(0), /// "🍎" /// ); +/// +/// // For generic methods that fill a list of values for an [`ArrayBuilder`], use the [`Extend`] trait. Review Comment: To make this easier to find, I suggest 1. Moving it above the Custom Builder heading (right after Basic Usage) 2. making it its own heading so it is more visible Something like (will need new `use`, etc): ``` # Using the [`Extend`] trait to append values from an iterator: ... start new example /// // For generic methods that fill a list of values for an [`ArrayBuilder`], use the [`Extend`] trait. ``` ########## arrow-array/src/builder/mod.rs: ########## @@ -234,6 +236,47 @@ use std::any::Any; /// .value(0), /// "🍎" /// ); +/// +/// // For generic methods that fill a list of values for an [`ArrayBuilder`], use the [`Extend`] trait. Review Comment: I also suggest starting with the basic example of just using `Extend`: calling `extend` with an iter: `list_builder.extend(pear.iter())` And then move on to the fancier one that does filtering -- 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]
