vegarsti commented on code in PR #8851:
URL: https://github.com/apache/arrow-rs/pull/8851#discussion_r2529694805
##########
arrow-schema/src/schema.rs:
##########
@@ -293,6 +331,20 @@ impl Schema {
/// );
/// ```
pub fn try_merge(schemas: impl IntoIterator<Item = Self>) -> Result<Self,
ArrowError> {
+ let schemas = schemas.into_iter().collect::<Vec<Self>>();
Review Comment:
This increases the memory consumption of this method. An alternative could
be to change the function signature to `schemas: &[Self]`? but I haven't
checked if that is feasible.
##########
arrow-schema/src/schema.rs:
##########
@@ -293,6 +331,20 @@ impl Schema {
/// );
/// ```
pub fn try_merge(schemas: impl IntoIterator<Item = Self>) -> Result<Self,
ArrowError> {
+ let schemas = schemas.into_iter().collect::<Vec<Self>>();
Review Comment:
This increases the memory consumption of this method. An alternative could
be to change the function signature to `schemas: &[Self]`? But I haven't
checked if that is feasible.
--
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]