Commits


alamb authored and Andy Grove committed 247996e5fcd
ARROW-9899: [Rust] [DataFusion] Switch from Box<Schema> --> SchemaRef (Arc<Schema>) to be consistent with the rest of Arrow This PR proposes using `SchemaRef` (which is an `Arc<Schema>`) instead of `Box<Schema> `inside Datafusion to be consistent with the rest of the arrow implementation, avoid so many copies, and make the code simpler. A pretty good example of the simplification is: *before*: ``` projected_schema: Box::new(csv.schema().as_ref().to_owned()), ``` *after*: ``` projected_schema: csv.schema().clone()), ``` This code is not only clearer to understand in my opinion, it is also likely faster (it is a clone of an `Arc` (and an increment of a refcount) rather than a clone of the actual `Schema` itself) Closes #8086 from alamb/alamb/try-arc Authored-by: alamb <andrew@nerdnetworks.org> Signed-off-by: Andy Grove <andygrove73@gmail.com>