You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Andrew Lamb (Jira)" <ji...@apache.org> on 2020/12/11 21:31:00 UTC
[jira] [Resolved] (ARROW-10865) [Rust][DataFusion] More ergonomic
conversion between Schema, SchemaRef, DFSchema, and DFSchemaRef
[ https://issues.apache.org/jira/browse/ARROW-10865?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrew Lamb resolved ARROW-10865.
---------------------------------
Fix Version/s: 3.0.0
Resolution: Fixed
Issue resolved by pull request 8888
[https://github.com/apache/arrow/pull/8888]
> [Rust][DataFusion] More ergonomic conversion between Schema, SchemaRef, DFSchema, and DFSchemaRef
> -------------------------------------------------------------------------------------------------
>
> Key: ARROW-10865
> URL: https://issues.apache.org/jira/browse/ARROW-10865
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Rust - DataFusion
> Reporter: Andrew Lamb
> Assignee: Andrew Lamb
> Priority: Major
> Labels: pull-request-available
> Fix For: 3.0.0
>
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> https://github.com/apache/arrow/pull/8839 added a DFSchema wrapper object into DataFusion so we can represent multiple relations (e.g. tables) easily
> However, it is somewhat annyoing to use now (as I discovered while trying to update IOx to use the latest version of Arrow).
> Specifically, there are things like this:
> ```
> Arc::new(DFSchema::from(&parquet.schema())?),
> ```
> Instead I would like to be able to write
> ```
> parquet.schema().try_into()?
> ```
> There are several other conversions I would like to be able to use the standard Rust into or `try_into` for:
> Schema -> DFSchema
> Schema -> Arc<DFSchema>
> Arc<Schema> -> DFSchema
> Arc<Schema> -> Arc<DFSchema>
> DFSchema -> Schema
> DFSchema -> Arc<Schema>
> Arc<DFSchema> -> Schema
> Arc<DFSchema> -> Arc<Schema>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)