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/12/10 17:03:43 UTC

[GitHub] [arrow] jorgecarleitao commented on a change in pull request #8888: ARROW-10865: [Rust] Easier to use Schema -> DFSchema conversion

jorgecarleitao commented on a change in pull request #8888:
URL: https://github.com/apache/arrow/pull/8888#discussion_r540340548



##########
File path: rust/datafusion/src/logical_plan/dfschema.rs
##########
@@ -89,11 +89,11 @@ impl DFSchema {
     }
 
     /// Create a `DFSchema` from an Arrow schema
-    pub fn from(schema: &Schema) -> Result<Self> {
+    pub fn try_from(schema: Schema) -> Result<Self> {

Review comment:
       There is a trait for it: https://doc.rust-lang.org/std/convert/trait.TryFrom.html




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