Skip to content

Commit 9e0ff12

Browse files
author
Morgan Killik
authored
Merge branch 'main' into GH-47996_Update_AWS_SDK_Version_1.11.691
2 parents 78b9053 + 1044022 commit 9e0ff12

23 files changed

+316
-353
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,7 @@ repos:
341341
?^ci/scripts/release_test\.sh$|
342342
?^ci/scripts/ruby_test\.sh$|
343343
?^ci/scripts/rust_build\.sh$|
344+
?^ci/scripts/util_download_apache\.sh$|
344345
?^ci/scripts/util_enable_core_dumps\.sh$|
345346
?^ci/scripts/util_free_space\.sh$|
346347
?^ci/scripts/util_log\.sh$|

LICENSE.txt

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -455,30 +455,6 @@ limitations under the License.
455455

456456
--------------------------------------------------------------------------------
457457

458-
The script ci/scripts/util_wait_for_it.sh has the following license
459-
460-
Copyright (c) 2016 Giles Hall
461-
462-
Permission is hereby granted, free of charge, to any person obtaining a copy of
463-
this software and associated documentation files (the "Software"), to deal in
464-
the Software without restriction, including without limitation the rights to
465-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
466-
of the Software, and to permit persons to whom the Software is furnished to do
467-
so, subject to the following conditions:
468-
469-
The above copyright notice and this permission notice shall be included in all
470-
copies or substantial portions of the Software.
471-
472-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
473-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
474-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
475-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
476-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
477-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
478-
SOFTWARE.
479-
480-
--------------------------------------------------------------------------------
481-
482458
The script r/configure has the following license (MIT)
483459

484460
Copyright (c) 2017, Jeroen Ooms and Jim Hester

ci/scripts/util_download_apache.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,9 @@ APACHE_MIRRORS=(
4444

4545
mkdir -p "${target_dir}"
4646

47-
for mirror in ${APACHE_MIRRORS[*]}
47+
for mirror in "${APACHE_MIRRORS[@]}"
4848
do
49-
curl -SL "${mirror}/${tarball_path}" | tar -xzf - -C "${target_dir}"
50-
if [ $? == 0 ]; then
49+
if curl -SL "${mirror}/${tarball_path}" | tar -xzf - -C "${target_dir}"; then
5150
exit 0
5251
fi
5352
done

ci/scripts/util_wait_for_it.sh

Lines changed: 0 additions & 199 deletions
This file was deleted.

cpp/cmake_modules/ThirdpartyToolchain.cmake

Lines changed: 65 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2799,37 +2799,66 @@ if(ARROW_WITH_ZSTD)
27992799
endif()
28002800

28012801
# ----------------------------------------------------------------------
2802-
# RE2 (required for Gandiva)
2802+
# RE2 (required for Gandiva and gRPC)
28032803

2804-
macro(build_re2)
2805-
message(STATUS "Building RE2 from source")
2806-
set(RE2_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/re2_ep-install")
2807-
set(RE2_STATIC_LIB
2808-
"${RE2_PREFIX}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}re2${CMAKE_STATIC_LIBRARY_SUFFIX}")
2804+
function(build_re2)
2805+
list(APPEND CMAKE_MESSAGE_INDENT "RE2: ")
2806+
message(STATUS "Building RE2 from source using FetchContent")
2807+
set(RE2_VENDORED
2808+
TRUE
2809+
PARENT_SCOPE)
2810+
set(RE2_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/re2_fc-install")
2811+
set(RE2_PREFIX
2812+
"${RE2_PREFIX}"
2813+
PARENT_SCOPE)
28092814

2810-
set(RE2_CMAKE_ARGS ${EP_COMMON_CMAKE_ARGS} "-DCMAKE_INSTALL_PREFIX=${RE2_PREFIX}")
2815+
fetchcontent_declare(re2
2816+
URL ${RE2_SOURCE_URL}
2817+
URL_HASH "SHA256=${ARROW_RE2_BUILD_SHA256_CHECKSUM}")
2818+
prepare_fetchcontent()
28112819

2812-
externalproject_add(re2_ep
2813-
${EP_COMMON_OPTIONS}
2814-
INSTALL_DIR ${RE2_PREFIX}
2815-
URL ${RE2_SOURCE_URL}
2816-
URL_HASH "SHA256=${ARROW_RE2_BUILD_SHA256_CHECKSUM}"
2817-
CMAKE_ARGS ${RE2_CMAKE_ARGS}
2818-
BUILD_BYPRODUCTS "${RE2_STATIC_LIB}")
2819-
2820-
file(MAKE_DIRECTORY "${RE2_PREFIX}/include")
2821-
add_library(re2::re2 STATIC IMPORTED)
2822-
set_target_properties(re2::re2 PROPERTIES IMPORTED_LOCATION "${RE2_STATIC_LIB}")
2823-
target_include_directories(re2::re2 BEFORE INTERFACE "${RE2_PREFIX}/include")
2824-
2825-
add_dependencies(re2::re2 re2_ep)
2826-
set(RE2_VENDORED TRUE)
2827-
# Set values so that FindRE2 finds this too
2828-
set(RE2_LIB ${RE2_STATIC_LIB})
2829-
set(RE2_INCLUDE_DIR "${RE2_PREFIX}/include")
2830-
2831-
list(APPEND ARROW_BUNDLED_STATIC_LIBS re2::re2)
2832-
endmacro()
2820+
# Unity build causes some build errors
2821+
set(CMAKE_UNITY_BUILD OFF)
2822+
fetchcontent_makeavailable(re2)
2823+
2824+
# This custom target ensures re2 is built before we install
2825+
add_custom_target(re2_built DEPENDS re2::re2)
2826+
2827+
add_custom_command(OUTPUT "${re2_BINARY_DIR}/cmake_install.cmake.saved"
2828+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
2829+
"${re2_BINARY_DIR}/cmake_install.cmake"
2830+
"${re2_BINARY_DIR}/cmake_install.cmake.saved"
2831+
COMMAND ${CMAKE_COMMAND} -E echo
2832+
"# RE2 install disabled to prevent double installation with Arrow"
2833+
> "${re2_BINARY_DIR}/cmake_install.cmake"
2834+
DEPENDS re2_built
2835+
COMMENT "Disabling RE2 install to prevent double installation"
2836+
VERBATIM)
2837+
2838+
add_custom_target(re2_install_disabled ALL
2839+
DEPENDS "${re2_BINARY_DIR}/cmake_install.cmake.saved")
2840+
2841+
# Install RE2 to RE2_PREFIX for gRPC to find
2842+
add_custom_command(OUTPUT "${RE2_PREFIX}/.re2_installed"
2843+
COMMAND ${CMAKE_COMMAND} -E copy_if_different
2844+
"${re2_BINARY_DIR}/cmake_install.cmake.saved"
2845+
"${re2_BINARY_DIR}/cmake_install.cmake.tmp"
2846+
COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX=${RE2_PREFIX}
2847+
-DCMAKE_INSTALL_CONFIG_NAME=$<CONFIG> -P
2848+
"${re2_BINARY_DIR}/cmake_install.cmake.tmp" ||
2849+
${CMAKE_COMMAND} -E true
2850+
COMMAND ${CMAKE_COMMAND} -E touch "${RE2_PREFIX}/.re2_installed"
2851+
DEPENDS re2_install_disabled
2852+
COMMENT "Installing RE2 to ${RE2_PREFIX} for gRPC"
2853+
VERBATIM)
2854+
2855+
add_custom_target(re2_fc DEPENDS "${RE2_PREFIX}/.re2_installed")
2856+
2857+
set(ARROW_BUNDLED_STATIC_LIBS
2858+
${ARROW_BUNDLED_STATIC_LIBS} re2::re2
2859+
PARENT_SCOPE)
2860+
list(POP_BACK CMAKE_MESSAGE_INDENT)
2861+
endfunction()
28332862

28342863
if(ARROW_WITH_RE2)
28352864
resolve_dependency(re2
@@ -3234,7 +3263,7 @@ macro(build_grpc)
32343263
endif()
32353264

32363265
if(RE2_VENDORED)
3237-
add_dependencies(grpc_dependencies re2_ep)
3266+
add_dependencies(grpc_dependencies re2_fc)
32383267
endif()
32393268

32403269
add_dependencies(grpc_dependencies ${ARROW_PROTOBUF_LIBPROTOBUF} c-ares::cares
@@ -3255,8 +3284,13 @@ macro(build_grpc)
32553284
get_filename_component(GRPC_CARES_ROOT "${GRPC_CARES_INCLUDE_DIR}" DIRECTORY)
32563285
endif()
32573286

3258-
get_target_property(GRPC_RE2_INCLUDE_DIR re2::re2 INTERFACE_INCLUDE_DIRECTORIES)
3259-
get_filename_component(GRPC_RE2_ROOT "${GRPC_RE2_INCLUDE_DIR}" DIRECTORY)
3287+
# For FetchContent RE2, use the install prefix directly
3288+
if(RE2_VENDORED)
3289+
set(GRPC_RE2_ROOT "${RE2_PREFIX}")
3290+
else()
3291+
get_target_property(GRPC_RE2_INCLUDE_DIR re2::re2 INTERFACE_INCLUDE_DIRECTORIES)
3292+
get_filename_component(GRPC_RE2_ROOT "${GRPC_RE2_INCLUDE_DIR}" DIRECTORY)
3293+
endif()
32603294

32613295
# Put Abseil, etc. first so that local directories are searched
32623296
# before (what are likely) system directories

cpp/examples/arrow/parquet_read_write.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,9 @@ arrow::Status WriteFullFile(std::string path_to_file) {
118118
std::shared_ptr<arrow::io::FileOutputStream> outfile;
119119
ARROW_ASSIGN_OR_RAISE(outfile, arrow::io::FileOutputStream::Open(path_to_file));
120120

121-
ARROW_RETURN_NOT_OK(parquet::arrow::WriteTable(*table.get(),
122-
arrow::default_memory_pool(), outfile,
123-
/*chunk_size=*/64*1024, props, arrow_props));
121+
ARROW_RETURN_NOT_OK(
122+
parquet::arrow::WriteTable(*table.get(), arrow::default_memory_pool(), outfile,
123+
/*chunk_size=*/64 * 1024, props, arrow_props));
124124
return arrow::Status::OK();
125125
}
126126

cpp/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ project(
2222
version: '23.0.0-SNAPSHOT',
2323
license: 'Apache-2.0',
2424
meson_version: '>=1.3.0',
25-
default_options: ['c_std=gnu11,c11', 'warning_level=2', 'cpp_std=c++17'],
25+
default_options: ['c_std=c11', 'warning_level=2', 'cpp_std=c++17'],
2626
)
2727

2828
project_args = [

0 commit comments

Comments
 (0)