zanmato1984 commented on code in PR #45565: URL: https://github.com/apache/arrow/pull/45565#discussion_r1981066601
########## cpp/src/arrow/acero/project_node.cc: ########## @@ -59,8 +59,10 @@ class ProjectNode : public MapNode { for (size_t i = 0; i < exprs.size(); ++i) { names[i] = exprs[i].ToString(); } + } else { + ARROW_RETURN_IF(names.size() != exprs.size(), + Status::Invalid("Check failed: (names.size()) == (exprs.size())")); Review Comment: Can we make the error message more informative? I.e., printing both sizes of `names` and `exprs`. ########## cpp/src/arrow/acero/project_node.cc: ########## @@ -59,8 +59,10 @@ class ProjectNode : public MapNode { for (size_t i = 0; i < exprs.size(); ++i) { names[i] = exprs[i].ToString(); } + } else { + ARROW_RETURN_IF(names.size() != exprs.size(), + Status::Invalid("Check failed: (names.size()) == (exprs.size())")); Review Comment: ```suggestion ARROW_RETURN_IF( names.size() != exprs.size(), Status::Invalid("Project node's size of names " + std::to_string(names.size()) + " doesn't match size of expressions " + std::to_string(exprs.size()))); ``` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org