[
https://issues.apache.org/jira/browse/ARROW-16769?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17554326#comment-17554326
]
Aldrin M edited comment on ARROW-16769 at 6/15/22 12:27 AM:
------------------------------------------------------------
[~apitrou] [~lidavidm] , I could use some advice.
I made the change for `~RecordBatchReader` as Weston mentioned above:
[634a894|https://github.com/apache/arrow/commit/6e4a894c2c5ee35a4adfe5b04cec94b7b49b245e].
Then, when adding `ARROW_WARN_NOT_OK`, I could only find `ABORT_NOT_OK` in
([github
search|https://github.com/apache/arrow/search?q=%22define+ABORT_NOT_OK%22]):
*
[gtest_util.h|https://github.com/apache/arrow/blob/1de30af020ebcfd006b4b5cd56dadf07635286ab/cpp/src/arrow/testing/gtest_util.h#L105]
*
[hiveserver2/sample_usage.cc|https://github.com/apache/arrow/blob/8e43f23dcc6a9e630516228f110c48b64d13cec6/cpp/src/arrow/dbi/hiveserver2/sample_usage.cc#L33]
But, I also noticed that `ARROW_WARN_NOT_OK` exists ([github
search|https://github.com/apache/arrow/search?q=%22define+ARROW_WARN_NOT_OK%22])
in
[logging.h|https://github.com/apache/arrow/blob/c4ef0486b16112813857e587dab84b3461b90542/cpp/src/arrow/util/logging.h#L89].
So, my questions are:
* should I redefine ARROW_WARN_NOT_OK to use Status::Warn()
* should ABORT_NOT_OK be moved into status.h so that it is accessible even
when gtest is not used (I think gtest is optional?)
thanks!
was (Author: octalene):
[~apitrou] [~lidavidm]
I could use some advice. I made the change for `~RecordBatchReader` as Weston
mentioned above:
[634a894|https://github.com/apache/arrow/commit/6e4a894c2c5ee35a4adfe5b04cec94b7b49b245e].
Then, when adding `ARROW_WARN_NOT_OK`, I could only find `ABORT_NOT_OK` in
([github
search|https://github.com/apache/arrow/search?q=%22define+ABORT_NOT_OK%22]):
*
[gtest_util.h|https://github.com/apache/arrow/blob/1de30af020ebcfd006b4b5cd56dadf07635286ab/cpp/src/arrow/testing/gtest_util.h#L105]
*
[hiveserver2/sample_usage.cc|https://github.com/apache/arrow/blob/8e43f23dcc6a9e630516228f110c48b64d13cec6/cpp/src/arrow/dbi/hiveserver2/sample_usage.cc#L33]
But, I also noticed that `ARROW_WARN_NOT_OK` exists ([github
search|https://github.com/apache/arrow/search?q=%22define+ARROW_WARN_NOT_OK%22])
in
[logging.h|https://github.com/apache/arrow/blob/c4ef0486b16112813857e587dab84b3461b90542/cpp/src/arrow/util/logging.h#L89].
So, my questions are:
* should I redefine ARROW_WARN_NOT_OK to use Status::Warn()
* should ABORT_NOT_OK be moved into status.h so that it is accessible even
when gtest is not used (I think gtest is optional?)
thanks!
> [C++] Add Status::Warn()
> ------------------------
>
> Key: ARROW-16769
> URL: https://issues.apache.org/jira/browse/ARROW-16769
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Antoine Pitrou
> Assignee: Aldrin M
> Priority: Minor
> Labels: good-first-issue
> Fix For: 9.0.0
>
>
> We currently have {{Status::Abort()}} which gives an easy way to abort the
> process with a meaningful message and detail.
> We should similarly add {{Status::Warn()}} that would simply print a warning
> message of the error. Possible example use at
> https://github.com/apache/arrow/pull/13315/files#diff-1256864b34a1b43082596ab5b16881702881ad06be8e1c157b47e1e6ac9ff5d2R160-R164
> (together with {{StatusFromErrno}}).
--
This message was sent by Atlassian Jira
(v8.20.7#820007)