[ 
https://issues.apache.org/jira/browse/ARROW-2393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16444128#comment-16444128
 ] 

ASF GitHub Bot commented on ARROW-2393:
---------------------------------------

pitrou commented on issue #1904: ARROW-2393: [C++] Moving 
ARROW_CHECK_OK_[PREPEND] macros from status.h into util/logging.h since they 
use the logging infrastructure and shouldn't be in the public API.
URL: https://github.com/apache/arrow/pull/1904#issuecomment-382760272
 
 
   We shouldn't remove ARROW_RETURN_NOT_OK, as it's showcased in our docs:
   https://arrow.apache.org/docs/cpp/md_tutorials_row_wise_conversion.html
   and used in third-party projects:
   https://github.com/search?p=&q=ARROW_RETURN_NOT_OK&type=Code
   
   Instead just alias it to RETURN_NOT_OK.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> [C++] arrow/status.h does not define ARROW_CHECK needed for ARROW_CHECK_OK
> --------------------------------------------------------------------------
>
>                 Key: ARROW-2393
>                 URL: https://issues.apache.org/jira/browse/ARROW-2393
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 0.9.0
>            Reporter: dennis lucero
>            Priority: Trivial
>              Labels: pull-request-available
>
> test.cpp
> {code:c++}
> #include <arrow/api.h>
> int main(void) {
> arrow::Int64Builder i64builder;
> std::shared_ptr<arrow::Array> i64array;
> ARROW_CHECK_OK(i64builder.Finish(&i64array));
> return EXIT_SUCCESS;
> }
> {code}
> Attempt to build:
> {code:bash}
> $CXX test.cpp -std=c++11 -larrow
> {code}
> Error:
> {code}
> test.cpp:6:2: error: use of undeclared identifier 'ARROW_CHECK' 
> ARROW_CHECK_OK(i64builder.Finish(&i64array)); ^ 
> xxx/include/arrow/status.h:49:27: note: expanded from macro 'ARROW_CHECK_OK' 
> #define ARROW_CHECK_OK(s) ARROW_CHECK_OK_PREPEND(s, "Bad status") ^ 
> xxx/include/arrow/status.h:44:5: note: expanded from macro 
> 'ARROW_CHECK_OK_PREPEND' ARROW_CHECK(_s.ok()) << (msg) << ": " << 
> _s.ToString(); \ ^ 1 error generated.
> {code}
> I expect that ARROW_* macro are public API, and should work out of the box.
> A naive attempt to fix it
> {code}
> diff --git a/cpp/src/arrow/status.h b/cpp/src/arrow/status.h
> index 84f55e41..6da4a773 100644
> --- a/cpp/src/arrow/status.h
> +++ b/cpp/src/arrow/status.h
> @@ -25,6 +25,7 @@
>  #include "arrow/util/macros.h"
>  #include "arrow/util/visibility.h"
> +#include "arrow/util/logging.h"
>  // Return the given status if it is not OK.
>  #define ARROW_RETURN_NOT_OK(s)           \
> {code}
> fails with
> {code}
> public-api-test.cc:21:2: error: "DCHECK should not be visible from Arrow 
> public headers."
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to