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
ARROW-10938: [Rust] upgrade dependency "flatbuffers" to 0.8 #8936
Conversation
… rust/arrow/src/ipc/gen/ format/*.fbs
…sed by API changes
rust/parquet/src/arrow/schema.rs
Outdated
message | ||
.header_as_schema() | ||
.map(arrow::ipc::convert::fb_to_schema) | ||
if let Ok(message) = arrow::ipc::root_as_message(slice) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are ignoring errors here too. Is this the intent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE. Since there is already a eprintln!(), the new error is caught 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>>
.
Thanks @mqy this is looking good and I appreciate you breaking this down into the individual commits. I have some questions on error handling but other than that it LGTM. |
@andygrove that's great! Since i'm pretty new to rust, it may take me some time to completely fix/enhance the "Option -> Result problems", and time to sleep for now. I'll continue this PR next morning, if ... it is not merged :) |
Codecov Report
@@ Coverage Diff @@
## master #8936 +/- ##
==========================================
- Coverage 83.26% 82.85% -0.42%
==========================================
Files 195 196 +1
Lines 48066 48577 +511
==========================================
+ Hits 40023 40249 +226
- Misses 8043 8328 +285
Continue to review full report at Codecov.
|
@alamb pushed another commit 0dff5ea1ee It's the update after fixing flatc rust generator, google/flatbuffers 05192553 FYI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, we should open a JIRA to move us to the next flatbuffers
release
Thanks @mqy -- I'll try and look at this carefully tomorrow. |
@nevi-me -- filed https://issues.apache.org/jira/browse/ARROW-10997 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went through this commit by commit -- the breakdown of this PR into commits was super helpful. I'll file some tickets to handle follow on improvements but then I plan to merge this one in.
Thanks again @mqy
.header_as_schema() | ||
.map(arrow::ipc::convert::fb_to_schema), | ||
Err(err) => { | ||
// The flatbuffers implementation returns an error on verification error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
I merged this branch into apache/master and ran the tests locally just to be sure things are good. Merging |
…chema_from_metadata() #8936 updated crate `flatbuffers` to 0.8.0 , but function `get_arrow_schema_from_metadata` still returning `Option` rather than `Result`. This PR fixes this issue. Closes #9058 from mqy/get_arrow_schema_from_metadata Authored-by: mqy <meng.qingyou@gmail.com> Signed-off-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
…chema_from_metadata() apache/arrow#8936 updated crate `flatbuffers` to 0.8.0 , but function `get_arrow_schema_from_metadata` still returning `Option` rather than `Result`. This PR fixes this issue. Closes #9058 from mqy/get_arrow_schema_from_metadata Authored-by: mqy <meng.qingyou@gmail.com> Signed-off-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
[flatbuffers](https://crates.io/crates/flatbuffers) 0.8.0 was released on Dec 10, 2020, with some notable changes: - new verifier - common rust traits to FlatBufferBuilder - new VectorIter - add FlatBufferBuilder::force_defaults API - Optional Scalars - up to 2018 edition - possible performance speedup - ... and minor breaking change to some APIs, for example: remove "get_", return Result. flatbuffers 0.8.0 requires the latest flatc, the git commit for flatc is updated too. I deliberately commit all changes step by step to make them clear. Closes apache#8936 from mqy/flatbuffers-0.8.0 Authored-by: mqy <meng.qingyou@gmail.com> Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
…chema_from_metadata() apache#8936 updated crate `flatbuffers` to 0.8.0 , but function `get_arrow_schema_from_metadata` still returning `Option` rather than `Result`. This PR fixes this issue. Closes apache#9058 from mqy/get_arrow_schema_from_metadata Authored-by: mqy <meng.qingyou@gmail.com> Signed-off-by: Jorge C. Leitao <jorgecarleitao@gmail.com>
flatbuffers 0.8.0 was released on Dec 10, 2020, with some notable changes:
flatbuffers 0.8.0 requires the latest flatc, the git commit for flatc is updated too.
I deliberately commit all changes step by step to make them clear.