You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2019/07/18 09:22:35 UTC

[arrow] branch master updated: ARROW-5976: [C++] RETURN_IF_ERROR(ctx) should be namespaced

This is an automated email from the ASF dual-hosted git repository.

apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new c1f25e8  ARROW-5976: [C++] RETURN_IF_ERROR(ctx) should be namespaced
c1f25e8 is described below

commit c1f25e849fa9b6108dd4f77af2707a72356dd25d
Author: Micah Kornfield <em...@gmail.com>
AuthorDate: Thu Jul 18 11:22:21 2019 +0200

    ARROW-5976: [C++] RETURN_IF_ERROR(ctx) should be namespaced
    
    Author: Micah Kornfield <em...@gmail.com>
    
    Closes #4903 from emkornfield/namespace_macro and squashes the following commits:
    
    5d06dba24 <Micah Kornfield> ARROW-5976:  RETURN_IF_ERROR(ctx) should be namespaced
---
 cpp/src/arrow/compute/context.h       | 2 +-
 cpp/src/arrow/compute/kernels/cast.cc | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpp/src/arrow/compute/context.h b/cpp/src/arrow/compute/context.h
index 8ac4700..fc99a4f 100644
--- a/cpp/src/arrow/compute/context.h
+++ b/cpp/src/arrow/compute/context.h
@@ -36,7 +36,7 @@ class CpuInfo;
 
 namespace compute {
 
-#define RETURN_IF_ERROR(ctx)                  \
+#define ARROW_RETURN_IF_ERROR(ctx)            \
   if (ARROW_PREDICT_FALSE(ctx->HasError())) { \
     Status s = ctx->status();                 \
     ctx->ResetStatus();                       \
diff --git a/cpp/src/arrow/compute/kernels/cast.cc b/cpp/src/arrow/compute/kernels/cast.cc
index ef40f08..88a4f30 100644
--- a/cpp/src/arrow/compute/kernels/cast.cc
+++ b/cpp/src/arrow/compute/kernels/cast.cc
@@ -640,7 +640,7 @@ Status InvokeWithAllocation(FunctionContext* ctx, UnaryKernel* func, const Datum
   } else {
     RETURN_NOT_OK(detail::InvokeUnaryArrayKernel(ctx, func, input, &result));
   }
-  RETURN_IF_ERROR(ctx);
+  ARROW_RETURN_IF_ERROR(ctx);
   *out = detail::WrapDatumsLike(input, result);
   return Status::OK();
 }
@@ -1088,7 +1088,7 @@ class CastKernel : public CastKernelBase {
     RETURN_NOT_OK(detail::PropagateNulls(ctx, in_data, result));
 
     func_(ctx, options_, in_data, result);
-    RETURN_IF_ERROR(ctx);
+    ARROW_RETURN_IF_ERROR(ctx);
     return Status::OK();
   }