arrow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dennis lucero (JIRA)" <>
Subject [jira] [Created] (ARROW-2393) [C++] arrow/status.h does not define ARROW_CHECK needed for ARROW_CHECK_OK
Date Wed, 04 Apr 2018 18:29:00 GMT
dennis lucero created ARROW-2393:

             Summary: [C++] arrow/status.h does not define ARROW_CHECK needed for ARROW_CHECK_OK
                 Key: ARROW-2393
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++
    Affects Versions: 0.9.0
            Reporter: dennis lucero

#include <arrow/api.h>

int main(void) {
arrow::Int64Builder i64builder;
std::shared_ptr<arrow::Array> i64array;
Attempt to build:
$CXX test.cpp -std=c++11 -larrow
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.
I expect that ARROW_* macro are public API, and should work out of the box.
A naive attempt to fix it
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)           \
fails with
{code} error: "DCHECK should not be visible from Arrow public headers."

This message was sent by Atlassian JIRA

View raw message