You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Jorge Leitão (Jira)" <ji...@apache.org> on 2021/01/01 14:15:00 UTC

[jira] [Assigned] (ARROW-10996) [Rust] Return error messages via Result for get_arrow_schema_from_metadata

     [ https://issues.apache.org/jira/browse/ARROW-10996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jorge Leitão reassigned ARROW-10996:
------------------------------------

    Assignee: meng qingyou

> [Rust] Return error messages via Result for get_arrow_schema_from_metadata
> --------------------------------------------------------------------------
>
>                 Key: ARROW-10996
>                 URL: https://issues.apache.org/jira/browse/ARROW-10996
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: Rust
>            Reporter: Andrew Lamb
>            Assignee: meng qingyou
>            Priority: Minor
>              Labels: beginner-friendly, pull-request-available
>             Fix For: 3.0.0
>
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> While converting from the parquet schema to arrow schema some errors, including those during flatbuffer decoding, can be lost. 
> This is due to get_arrow_schema_from_metadata returning `Option` rather than `Result`
> https://github.com/apache/arrow/pull/8936/files# improved the situation by printing the error to stdout, so the error isn't entirely lost, but this message should be propagated up the call chain as a proper Rust error via a Result. 
> {code}
>             match arrow::ipc::root_as_message(slice) {
>                 Ok(message) => message
>                     .header_as_schema()
>                     .map(arrow::ipc::convert::fb_to_schema),
>                 Err(err) => {
>                     // The flatbuffers implementation returns an error on verification error.
>                     // TODO: return error to caller?
>                     eprintln!(
>                         "Unable to get root as message stored in {}: {:?}",
>                         super::ARROW_SCHEMA_META_KEY,
>                         err
>                     );
>                     None
>                 }
>             }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)