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:
[email protected]


Reply via email to