Adar Dembo has posted comments on this change. ( http://gerrit.cloudera.org:8080/8127 )
Change subject: WIP: Pull StatusOr<T> and related tests from protobuf ...................................................................... Patch Set 1: At first I thought this was supposed to be a StatusAnd<T>, which addresses a real pain point where some call paths want to return supplemental error information and it's nicer if that information was coupled with the Status itself. I remember Alexey distinctly wishing for that while working on a thorny CatalogManager error-handling patch. But, this is just syntactic sugar to combine an OUT parameter into the return value, right? Is it even worth it? I'm asking because it seems like with StatusOr<T> instead of one calling convention (e.g. "Status DoFoo(Bar* out1, Baz* out2)") we'll have two: Status DoFoo(const Bar& in) // functions without OUT params StatusOr<Bar> DoFoo(Baz* out2) // functions with 1+ OUT param That is, functions with no OUT params will continue to use Status, while calls with at least one OUT param will return the first in the StatusOr and the remainder as normal OUT params. I think this is especially weird for functions with multiple OUT params, because the first will be in StatusOr<T> while the rest will be regular OUT params. Or is the idea to combine all of them into StatusOr<pair>, Status<tuple>, or Status<some_struct>? These concerns can be alleviated if I understood how we intend to apply StatusOr. -- To view, visit http://gerrit.cloudera.org:8080/8127 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: If2d86a3769da733456956fb892de6d679a011a63 Gerrit-Change-Number: 8127 Gerrit-PatchSet: 1 Gerrit-Owner: David Ribeiro Alves <davidral...@gmail.com> Gerrit-Reviewer: Adar Dembo <a...@cloudera.com> Gerrit-Reviewer: Dan Burkert <danburk...@apache.org> Gerrit-Reviewer: David Ribeiro Alves <davidral...@gmail.com> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <t...@apache.org> Gerrit-Comment-Date: Thu, 28 Sep 2017 23:07:57 +0000 Gerrit-HasComments: No