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

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


The following commit(s) were added to refs/heads/main by this push:
     new e0c8c394b6 GH-43463: [C++][Gandiva] Always use gdv_function_stubs.h in 
context_helper.cc (#43464)
e0c8c394b6 is described below

commit e0c8c394b666d46bd567ffacadd8ad1c17fa4b3e
Author: Sutou Kouhei <[email protected]>
AuthorDate: Sat Aug 10 14:49:13 2024 +0900

    GH-43463: [C++][Gandiva] Always use gdv_function_stubs.h in 
context_helper.cc (#43464)
    
    ### Rationale for this change
    
    `gdv_function_stubs.h` has declarations of functions in `context_helper.cc`.
    
    If we don't include `gdv_function_stubs.h`, it causes attribution mismatch 
error with unity build.
    
    ### What changes are included in this PR?
    
    Always include `gdv_function_stubs.h` in `context_helper.cc`.
    
    ### Are these changes tested?
    
    Yes.
    
    ### Are there any user-facing changes?
    
    No.
    * GitHub Issue: #43463
    
    Authored-by: Sutou Kouhei <[email protected]>
    Signed-off-by: Sutou Kouhei <[email protected]>
---
 cpp/src/gandiva/context_helper.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/cpp/src/gandiva/context_helper.cc 
b/cpp/src/gandiva/context_helper.cc
index 03bbe1b7a6..8edd52b1fb 100644
--- a/cpp/src/gandiva/context_helper.cc
+++ b/cpp/src/gandiva/context_helper.cc
@@ -15,11 +15,13 @@
 // specific language governing permissions and limitations
 // under the License.
 
+#include "gandiva/execution_context.h"
+#include "gandiva/gdv_function_stubs.h"
+
 // This file is also used in the pre-compiled unit tests, which do include
 // llvm/engine/..
 #ifndef GANDIVA_UNIT_TEST
 #include "gandiva/exported_funcs.h"
-#include "gandiva/gdv_function_stubs.h"
 
 #include "gandiva/engine.h"
 
@@ -56,8 +58,6 @@ arrow::Status ExportedContextFunctions::AddMappings(Engine* 
engine) const {
 }  // namespace gandiva
 #endif  // !GANDIVA_UNIT_TEST
 
-#include "gandiva/execution_context.h"
-
 extern "C" {
 
 void gdv_fn_context_set_error_msg(int64_t context_ptr, char const* err_msg) {

Reply via email to