Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,14 @@ Apache 2.0 License or the under the 3-clause BSD license:
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------------------

This project includes code from Daniel Lemire's FrameOfReference project.

https://github.com/lemire/FrameOfReference/blob/6ccaf9e97160f9a3b299e23a8ef739e711ef0c71/src/bpacking.cpp

Copyright: 2013 Daniel Lemire
Home page: http://lemire.me/en/
Project page: https://github.com/lemire/FrameOfReference
License: Apache License Version 2.0 http://www.apache.org/licenses/LICENSE-2.0
5 changes: 5 additions & 0 deletions cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}")
"Build the plasma object store along with Arrow"
OFF)

option(ARROW_USE_SSE
"Build with SSE4 optimizations"
OFF)

option(ARROW_ZLIB_VENDORED
"Build our own zlib (some libz.a aren't configured for static linking)"
ON)
Expand Down Expand Up @@ -650,6 +654,7 @@ set(ARROW_SRCS

src/arrow/util/bit-util.cc
src/arrow/util/compression.cc
src/arrow/util/cpu-info.cc
src/arrow/util/decimal.cc
src/arrow/util/key_value_metadata.cc
)
Expand Down
8 changes: 4 additions & 4 deletions cpp/src/arrow/builder-benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ namespace arrow {

constexpr int64_t kFinalSize = 256;

#define ABORT_NOT_OK(s) \
do { \
::arrow::Status _s = (s); \
if (ARROW_PREDICT_FALSE(!_s.ok())) { exit(-1); } \
#define ABORT_NOT_OK(s) \
do { \
::arrow::Status _s = (s); \
if (ARROW_PREDICT_FALSE(!_s.ok())) { exit(-1); } \
} while (0);

static void BM_BuildPrimitiveArrayNoNulls(
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/compare.cc
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ class ArrayEqualsVisitor : public RangeEqualsVisitor {
: RangeEqualsVisitor(right, 0, right.length(), 0) {}

Status Visit(const NullArray& left) {
result_ = true;
return Status::OK();
result_ = true;
return Status::OK();
}

Status Visit(const BooleanArray& left) {
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/ipc/reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ class RecordBatchStreamReader::RecordBatchStreamReaderImpl {
return ReadSchema();
}

Status ReadNextMessage(Message::Type expected_type, bool allow_null,
std::shared_ptr<Message>* message) {
Status ReadNextMessage(
Message::Type expected_type, bool allow_null, std::shared_ptr<Message>* message) {
RETURN_NOT_OK(ReadMessage(stream_.get(), message));

if (!(*message) && !allow_null) {
Expand Down
16 changes: 8 additions & 8 deletions cpp/src/arrow/status.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
#include "arrow/util/visibility.h"

// Return the given status if it is not OK.
#define ARROW_RETURN_NOT_OK(s) \
do { \
::arrow::Status _s = (s); \
if (ARROW_PREDICT_FALSE(!_s.ok())) { return _s; } \
#define ARROW_RETURN_NOT_OK(s) \
do { \
::arrow::Status _s = (s); \
if (ARROW_PREDICT_FALSE(!_s.ok())) { return _s; } \
} while (0);

// If 'to_call' returns a bad status, CHECK immediately with a logged message
Expand All @@ -43,10 +43,10 @@

namespace arrow {

#define RETURN_NOT_OK(s) \
do { \
Status _s = (s); \
if (ARROW_PREDICT_FALSE(!_s.ok())) { return _s; } \
#define RETURN_NOT_OK(s) \
do { \
Status _s = (s); \
if (ARROW_PREDICT_FALSE(!_s.ok())) { return _s; } \
} while (0);

#define RETURN_NOT_OK_ELSE(s, else_) \
Expand Down
8 changes: 8 additions & 0 deletions cpp/src/arrow/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@
# Headers: top level
install(FILES
bit-util.h
bit-stream-utils.h
bpacking.h
compiler-util.h
compression.h
cpu-info.h
key_value_metadata.h
hash-util.h
logging.h
macros.h
random.h
rle-encoding.h
sse-util.h
stl.h
visibility.h
DESTINATION include/arrow/util)
Expand Down Expand Up @@ -56,4 +63,5 @@ ADD_ARROW_TEST(bit-util-test)
ADD_ARROW_TEST(compression-test)
ADD_ARROW_TEST(decimal-test)
ADD_ARROW_TEST(key-value-metadata-test)
ADD_ARROW_TEST(rle-encoding-test)
ADD_ARROW_TEST(stl-util-test)
Loading