westonpace commented on code in PR #13117:
URL: https://github.com/apache/arrow/pull/13117#discussion_r872148471
##########
cpp/src/arrow/dataset/file_base.cc:
##########
@@ -465,14 +465,7 @@ class TeeNode : public compute::MapNode {
// Need to wait for the task group to complete regardless of dw_status
task_group_.End().AddCallback(
[this, dw_status, finish_st](const Status& tg_status) {
- // Prefer dw_status then finish_st and then tg_status
- if (!dw_status.ok()) {
- finished_.MarkFinished(dw_status);
- }
- if (!finish_st.ok()) {
- finished_.MarkFinished(finish_st);
- }
- finished_.MarkFinished(tg_status);
+ finished_.MarkFinished(dw_status & finish_st & tg_status);
Review Comment:
Agreed. I'm not sure why it was chosen to be this way. Perhaps inspired by
python where `&&` forces the return of the operator to be a boolean.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]