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

raulcd 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 529e08c56f MINOR: [Python][CI] Avoid unconditional use of precompiled 
headers (#44288)
529e08c56f is described below

commit 529e08c56fdfb886c6df4102925695f02ab7ab2d
Author: Antoine Pitrou <[email protected]>
AuthorDate: Wed Oct 2 16:29:37 2024 +0200

    MINOR: [Python][CI] Avoid unconditional use of precompiled headers (#44288)
    
    The precompiled headers generated during the PyArrow build phase seem to 
take a lot of disk space (more than 2 GB).
    
    Avoiding their unconditional generation should make disk space issues on CI 
less likely.
    
    Here is an example failing build due to exhausted disk space: 
https://github.com/apache/arrow/actions/runs/11128048506/job/30921855648?pr=44250
    
    Authored-by: Antoine Pitrou <[email protected]>
    Signed-off-by: Raúl Cumplido <[email protected]>
---
 python/CMakeLists.txt                  | 2 +-
 python/pyarrow/src/arrow/python/udf.cc | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 912719b20f..710735adc7 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -454,7 +454,7 @@ endif()
 add_library(arrow_python SHARED ${PYARROW_CPP_SRCS})
 target_include_directories(arrow_python PUBLIC ${PYARROW_CPP_ROOT_DIR}
                                                
${CMAKE_CURRENT_BINARY_DIR}/pyarrow/src)
-if(NOT CMAKE_VERSION VERSION_LESS 3.16)
+if(ARROW_USE_PRECOMPILED_HEADERS)
   target_precompile_headers(arrow_python PUBLIC
                             "$<$<COMPILE_LANGUAGE:CXX>:arrow/python/pch.h>")
 endif()
diff --git a/python/pyarrow/src/arrow/python/udf.cc 
b/python/pyarrow/src/arrow/python/udf.cc
index 74f16899c4..f9c3b11cc7 100644
--- a/python/pyarrow/src/arrow/python/udf.cc
+++ b/python/pyarrow/src/arrow/python/udf.cc
@@ -16,6 +16,8 @@
 // under the License.
 
 #include "arrow/python/udf.h"
+
+#include "arrow/array/array_nested.h"
 #include "arrow/array/builder_base.h"
 #include "arrow/buffer_builder.h"
 #include "arrow/compute/api_aggregate.h"

Reply via email to