You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/06/08 02:54:13 UTC

[GitHub] [arrow] andygrove commented on a change in pull request #7371: ARROW-8736: [Rust] [DataFusion] Table API should provide a schema() method

andygrove commented on a change in pull request #7371:
URL: https://github.com/apache/arrow/pull/7371#discussion_r436435692



##########
File path: rust/datafusion/src/execution/table_impl.rs
##########
@@ -131,6 +132,11 @@ impl Table for TableImpl {
     ) -> Result<Vec<RecordBatch>> {
         ctx.collect_plan(&self.plan.clone(), batch_size)
     }
+
+    /// Returns the schema from the logical plan
+    fn schema(&self) -> &Box<Schema> {

Review comment:
       I'm curious, would it be possible to just return `&Schema` here? I know we tend to return `Arc<Schema>` in many places and this is a pattern I introduced when I was less familiar with Rust, but it would be good to start moving away from this pattern where we can.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org