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

ARROW-7306: [C++] Add Result-returning version of FileSystemFromUri #5952

Closed
wants to merge 1 commit into from

Conversation

mrkn
Copy link
Member

@mrkn mrkn commented Dec 4, 2019

I guess this should be in #5866

@mrkn mrkn requested a review from pitrou December 4, 2019 04:10
@mrkn mrkn changed the title Add Result-returning version of FileSystemFromUri ARROW-7306: [C++] Add Result-returning version of FileSystemFromUri Dec 4, 2019
@github-actions
Copy link

github-actions bot commented Dec 4, 2019

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just one nit.

inline Status FileSystemFromUri(const std::string& uri,
std::shared_ptr<FileSystem>* out_fs,
std::string* out_path = NULLPTR) {
ARROW_ASSIGN_OR_RAISE(*out_fs, FileSystemFromUri(uri, out_path));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can simply write return FileSystemFromUri(uri, out_path).Value(out_fs);

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I missed that feature!

Copy link
Member

@pitrou pitrou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1. Thank you @mrkn !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants