mqy commented on a change in pull request #8936:
URL: https://github.com/apache/arrow/pull/8936#discussion_r544856382
##########
File path: rust/parquet/src/arrow/schema.rs
##########
@@ -184,10 +184,13 @@ fn get_arrow_schema_from_metadata(encoded_meta: &str) ->
Option<Schema> {
} else {
bytes.as_slice()
};
- let message = arrow::ipc::get_root_as_message(slice);
- message
- .header_as_schema()
- .map(arrow::ipc::convert::fb_to_schema)
+ if let Ok(message) = arrow::ipc::root_as_message(slice) {
Review comment:
DONE. Since there is already a eprintln!(), the new error is cached with
eprintln!() too.
We may improve them later, right?
BTW, I failed to change the return type of
`get_arrow_schema_from_metadata()` from `Option<Schema>` to `Result<Schema>` or
`Result<Option<Schema>>`.
----------------------------------------------------------------
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:
[email protected]