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/21 13:03:34 UTC

[GitHub] [arrow] alamb commented on a change in pull request #8936: ARROW-10938: [Rust] upgrade dependency "flatbuffers" to 0.8

alamb commented on a change in pull request #8936:
URL: https://github.com/apache/arrow/pull/8936#discussion_r546691497



##########
File path: rust/parquet/src/arrow/schema.rs
##########
@@ -184,10 +184,21 @@ 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)
+            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.

Review comment:
       I filed https://issues.apache.org/jira/browse/ARROW-10996 to track returning this is a proper error message. I think this PR improves the situation so at least `eprintln!` is called where prior to this PR no error message is created.
   
   




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