Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust] Return error messages via Result for get_arrow_schema_from_metadata #26917

Closed
asfimport opened this issue Dec 21, 2020 · 1 comment
Closed

Comments

@asfimport
Copy link
Collaborator

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.

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

Reporter: Andrew Lamb / @alamb
Assignee: Qingyou Meng / @mqy

PRs and other links:

Note: This issue was originally created as ARROW-10996. Please see the migration documentation for further details.

@asfimport
Copy link
Collaborator Author

Jorge Leitão / @jorgecarleitao:
Issue resolved by pull request 9058
#9058

@asfimport asfimport added this to the 3.0.0 milestone Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant