From 5d06dba2465c4be37840a444aa41281df4ca409f Mon Sep 17 00:00:00 2001 From: Micah Kornfield Date: Thu, 18 Jul 2019 01:13:35 -0700 Subject: [PATCH] ARROW-5976: [C++] 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 8ac4700b91f..fc99a4f8108 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 ef40f086231..88a4f30873f 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(); }