alamb commented on code in PR #4467:
URL: https://github.com/apache/arrow-datafusion/pull/4467#discussion_r1037480835
##########
datafusion/core/src/physical_plan/file_format/mod.rs:
##########
@@ -183,17 +183,27 @@ struct FileGroupsDisplay<'a>(&'a [Vec<PartitionedFile>]);
impl<'a> Display for FileGroupsDisplay<'a> {
fn fmt(&self, f: &mut Formatter) -> FmtResult {
- let parts: Vec<_> = self
- .0
- .iter()
- .map(|pp| {
- pp.iter()
- .map(|pf| pf.object_meta.location.as_ref())
- .collect::<Vec<_>>()
- .join(", ")
- })
- .collect();
- write!(f, "[{}]", parts.join(", "))
+ let mut first_group = true;
+
+ for (i, group) in self.0.iter().enumerate() {
Review Comment:
This implementation also avoids allocating strings and Vecs, which I don't
think is a particularly important feature, but it is a nice benefit.
--
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]