You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ARROW-11414: [Rust] Reduce copies in Schema::try_merge
I was looking at this code yesterday while using it in IOx -- influxdata/influxdb_iox#703
## Rationale:
Even though `Schema::try_merge` requires a slice of `Schema`s (not schema refs) ownership of its inputs, it copies all of its fields. This is inefficient ideal in the common case where most of the fields in the merged `Schema` will be the same
## Changes:
This PR proposes to change the implementation so that `try_merge` takes something (like a `Vec`) that can iterate over the Schemas passed in and consume them, avoiding at least one copy per unique field. I intend no algorithmic changes, only performance improvement.
Closes#9347 from alamb/alamb/less-copy-in-merge
Authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
0 commit comments