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

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

commit e975616cc1edac0c38155d76113376004bda4e16
Author: Praveen <[email protected]>
AuthorDate: Fri Oct 5 15:41:28 2018 +0530

    [Gandiva] Fixed build issues due to cherry pick.
---
 cpp/cmake_modules/GandivaBuildUtils.cmake     |  1 +
 cpp/src/gandiva/CMakeLists.txt                |  9 +++----
 cpp/src/gandiva/execution_context.cc          |  2 +-
 cpp/src/gandiva/llvm_generator.h              | 34 ---------------------------
 cpp/src/gandiva/precompiled/CMakeLists.txt    |  2 +-
 cpp/src/gandiva/precompiled/arithmetic_ops.cc |  2 +-
 cpp/src/gandiva/precompiled/context_helper.h  |  2 +-
 7 files changed, 10 insertions(+), 42 deletions(-)

diff --git a/cpp/cmake_modules/GandivaBuildUtils.cmake 
b/cpp/cmake_modules/GandivaBuildUtils.cmake
index 4a069f0..8ef546b 100644
--- a/cpp/cmake_modules/GandivaBuildUtils.cmake
+++ b/cpp/cmake_modules/GandivaBuildUtils.cmake
@@ -107,6 +107,7 @@ function(add_precompiled_unit_test REL_TEST_NAME)
   target_include_directories(${TEST_NAME} PRIVATE ${CMAKE_SOURCE_DIR}/src)
   target_link_libraries(${TEST_NAME} PRIVATE ${GANDIVA_TEST_LINK_LIBS})
   target_compile_definitions(${TEST_NAME} PRIVATE GANDIVA_UNIT_TEST=1)
+  target_compile_definitions(${TEST_NAME} PRIVATE -DGDV_HELPERS)
   add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
   set_property(TEST ${TEST_NAME} PROPERTY LABELS unittest ${TEST_NAME})
 endfunction(add_precompiled_unit_test REL_TEST_NAME)
diff --git a/cpp/src/gandiva/CMakeLists.txt b/cpp/src/gandiva/CMakeLists.txt
index 1ca9e98..ada9e46 100644
--- a/cpp/src/gandiva/CMakeLists.txt
+++ b/cpp/src/gandiva/CMakeLists.txt
@@ -48,7 +48,8 @@ configure_file(bc_file_path.cc.in ${BC_FILE_PATH_CC})
 # helper files that are shared between libgandiva and libgandiva_helpers
 set(SHARED_HELPER_FILES
       like_holder.cc
-      regex_util.cc)
+      regex_util.cc
+      execution_context.cc)
 
 set(SRC_FILES annotator.cc
       bitmap_accumulator.cc
@@ -159,12 +160,12 @@ install(
   DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig/")
 
 #args: label test-file src-files
-add_gandiva_unit_test(bitmap_accumulator_test.cc bitmap_accumulator.cc)
-add_gandiva_unit_test(engine_llvm_test.cc engine.cc llvm_types.cc 
configuration.cc ${BC_FILE_PATH_CC})
+add_gandiva_unit_test(bitmap_accumulator_test.cc bitmap_accumulator.cc 
execution_context.cc)
+add_gandiva_unit_test(engine_llvm_test.cc engine.cc llvm_types.cc 
configuration.cc execution_context.cc ${BC_FILE_PATH_CC})
 add_gandiva_unit_test(function_signature_test.cc function_signature.cc)
 add_gandiva_unit_test(function_registry_test.cc function_registry.cc 
function_signature.cc)
 add_gandiva_unit_test(llvm_types_test.cc llvm_types.cc)
-add_gandiva_unit_test(llvm_generator_test.cc llvm_generator.cc regex_util.cc 
engine.cc llvm_types.cc expr_decomposer.cc function_registry.cc annotator.cc 
bitmap_accumulator.cc configuration.cc  function_signature.cc like_holder.cc 
regex_util.cc ${BC_FILE_PATH_CC})
+add_gandiva_unit_test(llvm_generator_test.cc llvm_generator.cc regex_util.cc 
engine.cc llvm_types.cc expr_decomposer.cc function_registry.cc annotator.cc 
bitmap_accumulator.cc configuration.cc  function_signature.cc like_holder.cc 
regex_util.cc execution_context.cc ${BC_FILE_PATH_CC})
 add_gandiva_unit_test(annotator_test.cc annotator.cc function_signature.cc)
 add_gandiva_unit_test(tree_expr_test.cc tree_expr_builder.cc 
expr_decomposer.cc annotator.cc function_registry.cc function_signature.cc 
like_holder.cc regex_util.cc)
 add_gandiva_unit_test(expr_decomposer_test.cc expr_decomposer.cc 
tree_expr_builder.cc annotator.cc function_registry.cc function_signature.cc 
like_holder.cc regex_util.cc)
diff --git a/cpp/src/gandiva/execution_context.cc 
b/cpp/src/gandiva/execution_context.cc
index e0a2887..b3fd149 100644
--- a/cpp/src/gandiva/execution_context.cc
+++ b/cpp/src/gandiva/execution_context.cc
@@ -12,7 +12,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-#include "codegen/execution_context.h"
+#include "gandiva/execution_context.h"
 
 namespace gandiva {
 #ifdef GDV_HELPERS
diff --git a/cpp/src/gandiva/llvm_generator.h b/cpp/src/gandiva/llvm_generator.h
index 5d60617..c57bba4 100644
--- a/cpp/src/gandiva/llvm_generator.h
+++ b/cpp/src/gandiva/llvm_generator.h
@@ -74,25 +74,6 @@ class LLVMGenerator {
   /// Visitor to generate the code for a decomposed expression.
   class Visitor : public DexVisitor {
    public:
-<<<<<<< HEAD
-    Visitor(LLVMGenerator* generator, llvm::Function* function,
-            llvm::BasicBlock* entry_block, llvm::Value* arg_addrs,
-            llvm::Value* arg_local_bitmaps, llvm::Value* loop_var);
-
-    void Visit(const VectorReadValidityDex& dex) override;
-    void Visit(const VectorReadFixedLenValueDex& dex) override;
-    void Visit(const VectorReadVarLenValueDex& dex) override;
-    void Visit(const LocalBitMapValidityDex& dex) override;
-    void Visit(const TrueDex& dex) override;
-    void Visit(const FalseDex& dex) override;
-    void Visit(const LiteralDex& dex) override;
-    void Visit(const NonNullableFuncDex& dex) override;
-    void Visit(const NullableNeverFuncDex& dex) override;
-    void Visit(const NullableInternalFuncDex& dex) override;
-    void Visit(const IfDex& dex) override;
-    void Visit(const BooleanAndDex& dex) override;
-    void Visit(const BooleanOrDex& dex) override;
-=======
     Visitor(LLVMGenerator *generator, llvm::Function *function,
             llvm::BasicBlock *entry_block, llvm::Value *arg_addrs,
             llvm::Value *arg_local_bitmaps, llvm::Value *arg_context_ptr,
@@ -111,7 +92,6 @@ class LLVMGenerator {
     void Visit(const IfDex &dex) override;
     void Visit(const BooleanAndDex &dex) override;
     void Visit(const BooleanOrDex &dex) override;
->>>>>>> f50cf372... [Gandiva]Error handling support. 
 
     LValuePtr result() { return result_; }
 
@@ -129,15 +109,9 @@ class LLVMGenerator {
     LValuePtr BuildValueAndValidity(const ValueValidityPair& pair);
 
     // Generate code to build the params.
-<<<<<<< HEAD
-    std::vector<llvm::Value*> BuildParams(FunctionHolder* holder,
-                                          const ValueValidityPairVector& args,
-                                          bool with_validity);
-=======
     std::vector<llvm::Value *> BuildParams(FunctionHolder *holder,
                                            const ValueValidityPairVector &args,
                                            bool with_validity, bool 
with_context);
->>>>>>> f50cf372... [Gandiva]Error handling support. 
 
     // Switch to the entry_block and get reference of the 
validity/value/offsets buffer
     llvm::Value* GetBufferReference(int idx, BufferType buffer_type, FieldPtr 
field);
@@ -150,20 +124,12 @@ class LLVMGenerator {
 
     LLVMGenerator* generator_;
     LValuePtr result_;
-<<<<<<< HEAD
-    llvm::Function* function_;
-    llvm::BasicBlock* entry_block_;
-    llvm::Value* arg_addrs_;
-    llvm::Value* arg_local_bitmaps_;
-    llvm::Value* loop_var_;
-=======
     llvm::Function *function_;
     llvm::BasicBlock *entry_block_;
     llvm::Value *arg_addrs_;
     llvm::Value *arg_local_bitmaps_;
     llvm::Value *arg_context_ptr_;
     llvm::Value *loop_var_;
->>>>>>> f50cf372... [Gandiva]Error handling support. 
   };
 
   // Generate the code for one expression, with the output of the expression 
going to
diff --git a/cpp/src/gandiva/precompiled/CMakeLists.txt 
b/cpp/src/gandiva/precompiled/CMakeLists.txt
index e82b4d4..891dcce 100644
--- a/cpp/src/gandiva/precompiled/CMakeLists.txt
+++ b/cpp/src/gandiva/precompiled/CMakeLists.txt
@@ -57,4 +57,4 @@ add_precompiled_unit_test(time_test.cc time.cc 
timestamp_arithmetic.cc)
 add_precompiled_unit_test(hash_test.cc hash.cc)
 add_precompiled_unit_test(sample_test.cc sample.cc)
 add_precompiled_unit_test(string_ops_test.cc string_ops.cc)
-add_precompiled_unit_test(arithmetic_ops_test.cc arithmetic_ops.cc 
../codegen/execution_context.cc)
+add_precompiled_unit_test(arithmetic_ops_test.cc arithmetic_ops.cc 
../execution_context.cc)
diff --git a/cpp/src/gandiva/precompiled/arithmetic_ops.cc 
b/cpp/src/gandiva/precompiled/arithmetic_ops.cc
index aa337eb..de2eb7d 100644
--- a/cpp/src/gandiva/precompiled/arithmetic_ops.cc
+++ b/cpp/src/gandiva/precompiled/arithmetic_ops.cc
@@ -15,7 +15,7 @@
 // specific language governing permissions and limitations
 // under the License.
 
-#include "../codegen/execution_context.h"
+#include "../execution_context.h"
 
 extern "C" {
 
diff --git a/cpp/src/gandiva/precompiled/context_helper.h 
b/cpp/src/gandiva/precompiled/context_helper.h
index 62bae62..d2a2864 100644
--- a/cpp/src/gandiva/precompiled/context_helper.h
+++ b/cpp/src/gandiva/precompiled/context_helper.h
@@ -15,7 +15,7 @@
 #ifndef GANDIVA_CONTEXT_HELPER_H
 #define GANDIVA_CONTEXT_HELPER_H
 
-#include "../codegen/execution_context.h"
+#include "../execution_context.h"
 
 void set_error_msg(int64_t context_ptr, char const* err_msg) {
   gandiva::helpers::ExecutionContext* execution_context_ptr =

Reply via email to