From 5c8d8c36c0b278359d61375ebd6642f949d2a053 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Wed, 8 Dec 2021 17:13:24 +0100 Subject: [PATCH] [C++] Fix Gandiva compile failure on Unity builds --- cpp/src/gandiva/arrow.h | 5 +++++ cpp/src/gandiva/like_holder.cc | 4 ---- cpp/src/gandiva/replace_holder.cc | 4 ---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/cpp/src/gandiva/arrow.h b/cpp/src/gandiva/arrow.h index e6d40cb18c6..96303029678 100644 --- a/cpp/src/gandiva/arrow.h +++ b/cpp/src/gandiva/arrow.h @@ -54,4 +54,9 @@ static inline bool is_decimal_128(DataTypePtr type) { return false; } } + +static inline bool IsArrowStringLiteral(arrow::Type::type type) { + return type == arrow::Type::STRING || type == arrow::Type::BINARY; +} + } // namespace gandiva diff --git a/cpp/src/gandiva/like_holder.cc b/cpp/src/gandiva/like_holder.cc index af9ac67d66a..fe91c6c9baf 100644 --- a/cpp/src/gandiva/like_holder.cc +++ b/cpp/src/gandiva/like_holder.cc @@ -62,10 +62,6 @@ const FunctionNode LikeHolder::TryOptimize(const FunctionNode& node) { return node; } -static bool IsArrowStringLiteral(arrow::Type::type type) { - return type == arrow::Type::STRING || type == arrow::Type::BINARY; -} - Status LikeHolder::Make(const FunctionNode& node, std::shared_ptr* holder) { ARROW_RETURN_IF(node.children().size() != 2 && node.children().size() != 3, Status::Invalid("'like' function requires two or three parameters")); diff --git a/cpp/src/gandiva/replace_holder.cc b/cpp/src/gandiva/replace_holder.cc index 8b42b585f9c..6109dcfa909 100644 --- a/cpp/src/gandiva/replace_holder.cc +++ b/cpp/src/gandiva/replace_holder.cc @@ -22,10 +22,6 @@ namespace gandiva { -static bool IsArrowStringLiteral(arrow::Type::type type) { - return type == arrow::Type::STRING || type == arrow::Type::BINARY; -} - Status ReplaceHolder::Make(const FunctionNode& node, std::shared_ptr* holder) { ARROW_RETURN_IF(node.children().size() != 3,