diff --git a/LICENSE.txt b/LICENSE.txt index 2f4988e212af..8c28c3ba94f9 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1258,84 +1258,6 @@ THE SOFTWARE. -------------------------------------------------------------------------------- -3rdparty dependency rapidjson is statically linked in certain binary -distributions, like the python wheels. rapidjson and its dependencies have the -following licenses: - -Tencent is pleased to support the open source community by making RapidJSON -available. - -Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. -All rights reserved. - -If you have downloaded a copy of the RapidJSON binary from Tencent, please note -that the RapidJSON binary is licensed under the MIT License. -If you have downloaded a copy of the RapidJSON source code from Tencent, please -note that RapidJSON source code is licensed under the MIT License, except for -the third-party components listed below which are subject to different license -terms. Your integration of RapidJSON into your own projects may require -compliance with the MIT License, as well as the other licenses applicable to -the third-party components included within RapidJSON. To avoid the problematic -JSON license in your own projects, it's sufficient to exclude the -bin/jsonchecker/ directory, as it's the only code under the JSON license. -A copy of the MIT License is included in this file. - -Other dependencies and licenses: - - Open Source Software Licensed Under the BSD License: - -------------------------------------------------------------------- - - The msinttypes r29 - Copyright (c) 2006-2013 Alexander Chemeris - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - * Neither the name of copyright holder nor the names of its contributors - may be used to endorse or promote products derived from this software - without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. - - Terms of the MIT License: - -------------------------------------------------------------------- - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the "Software"), - to deal in the Software without restriction, including without limitation - the rights to use, copy, modify, merge, publish, distribute, sublicense, - and/or sell copies of the Software, and to permit persons to whom the - Software is furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - --------------------------------------------------------------------------------- - 3rdparty dependency snappy is statically linked in certain binary distributions, like the python wheels. snappy has the following license: diff --git a/ci/conda_env_cpp.txt b/ci/conda_env_cpp.txt index 24911fb35ac2..9c4ddbc04fb9 100644 --- a/ci/conda_env_cpp.txt +++ b/ci/conda_env_cpp.txt @@ -43,7 +43,6 @@ nodejs>=16 orc<2.1.0 pkg-config python -rapidjson re2 simdjson snappy diff --git a/ci/docker/alpine-linux-3.22-cpp.dockerfile b/ci/docker/alpine-linux-3.22-cpp.dockerfile index 8d9df1b08229..a937900bc8d2 100644 --- a/ci/docker/alpine-linux-3.22-cpp.dockerfile +++ b/ci/docker/alpine-linux-3.22-cpp.dockerfile @@ -55,7 +55,6 @@ RUN apk add \ py3-pip \ py3-numpy-dev \ python3-dev \ - rapidjson-dev \ re2-dev \ rsync \ samurai \ diff --git a/ci/docker/debian-13-cpp.dockerfile b/ci/docker/debian-13-cpp.dockerfile index c5ab6b2b6502..0db437c949e1 100644 --- a/ci/docker/debian-13-cpp.dockerfile +++ b/ci/docker/debian-13-cpp.dockerfile @@ -87,7 +87,6 @@ RUN apt-get update -y -q && \ python3-dev \ python3-pip \ python3-venv \ - rapidjson-dev \ rsync \ rustc \ tzdata \ diff --git a/ci/docker/debian-experimental-cpp.dockerfile b/ci/docker/debian-experimental-cpp.dockerfile index d1b93054024f..9feda0602ca2 100644 --- a/ci/docker/debian-experimental-cpp.dockerfile +++ b/ci/docker/debian-experimental-cpp.dockerfile @@ -88,7 +88,6 @@ RUN if [ -n "${gcc}" ]; then \ python3-dev \ python3-pip \ python3-venv \ - rapidjson-dev \ rsync \ tzdata \ tzdata-legacy \ diff --git a/ci/docker/fedora-42-cpp.dockerfile b/ci/docker/fedora-42-cpp.dockerfile index 3f589446bd42..b4de0a27c045 100644 --- a/ci/docker/fedora-42-cpp.dockerfile +++ b/ci/docker/fedora-42-cpp.dockerfile @@ -58,7 +58,6 @@ RUN dnf update -y && \ python \ python-devel \ python-pip \ - rapidjson-devel \ re2-devel \ simdjson-devel \ snappy-devel \ diff --git a/ci/docker/ubuntu-22.04-cpp.dockerfile b/ci/docker/ubuntu-22.04-cpp.dockerfile index 52302bc15a09..7b2d9830b18b 100644 --- a/ci/docker/ubuntu-22.04-cpp.dockerfile +++ b/ci/docker/ubuntu-22.04-cpp.dockerfile @@ -119,7 +119,6 @@ RUN apt-get update -y -q && \ python3-rados \ python3-venv \ rados-objclass-dev \ - rapidjson-dev \ rsync \ tzdata \ uuid-runtime \ diff --git a/ci/docker/ubuntu-24.04-cpp.dockerfile b/ci/docker/ubuntu-24.04-cpp.dockerfile index 051a2577487e..31873fe35354 100644 --- a/ci/docker/ubuntu-24.04-cpp.dockerfile +++ b/ci/docker/ubuntu-24.04-cpp.dockerfile @@ -120,7 +120,6 @@ RUN apt-get update -y -q && \ python3-rados \ python3-venv \ rados-objclass-dev \ - rapidjson-dev \ rsync \ sudo \ tzdata \ diff --git a/ci/scripts/cpp_build.sh b/ci/scripts/cpp_build.sh index 248771991c4b..d8fe0d018df4 100755 --- a/ci/scripts/cpp_build.sh +++ b/ci/scripts/cpp_build.sh @@ -287,7 +287,6 @@ else -DPARQUET_BUILD_EXECUTABLES="${PARQUET_BUILD_EXECUTABLES:-OFF}" \ -DPARQUET_REQUIRE_ENCRYPTION="${PARQUET_REQUIRE_ENCRYPTION:-ON}" \ -DProtobuf_SOURCE="${Protobuf_SOURCE:-}" \ - -DRapidJSON_SOURCE="${RapidJSON_SOURCE:-}" \ -Dre2_SOURCE="${re2_SOURCE:-}" \ -Dsimdjson_SOURCE="${simdjson_SOURCE:-}" \ -DSnappy_SOURCE="${Snappy_SOURCE:-}" \ diff --git a/ci/scripts/msys2_setup.sh b/ci/scripts/msys2_setup.sh index 51fe097ec82e..b686822e78da 100755 --- a/ci/scripts/msys2_setup.sh +++ b/ci/scripts/msys2_setup.sh @@ -43,7 +43,6 @@ case "${target}" in packages+=("${MINGW_PACKAGE_PREFIX}-ninja") packages+=("${MINGW_PACKAGE_PREFIX}-nlohmann-json") packages+=("${MINGW_PACKAGE_PREFIX}-protobuf") - packages+=("${MINGW_PACKAGE_PREFIX}-rapidjson") packages+=("${MINGW_PACKAGE_PREFIX}-re2") packages+=("${MINGW_PACKAGE_PREFIX}-simdjson") packages+=("${MINGW_PACKAGE_PREFIX}-snappy") diff --git a/ci/scripts/r_revdepcheck.sh b/ci/scripts/r_revdepcheck.sh index 5c82d7e70ac3..a978310b9929 100755 --- a/ci/scripts/r_revdepcheck.sh +++ b/ci/scripts/r_revdepcheck.sh @@ -57,7 +57,6 @@ apt install -y \ python3-pip \ python3-rados \ rados-objclass-dev \ - rapidjson-dev \ tzdata \ wget diff --git a/ci/vcpkg/vcpkg.json b/ci/vcpkg/vcpkg.json index d069dbe99b7d..7fbfe7118f27 100644 --- a/ci/vcpkg/vcpkg.json +++ b/ci/vcpkg/vcpkg.json @@ -58,7 +58,6 @@ "json": { "description": "JSON support", "dependencies": [ - "rapidjson", "simdjson" ] }, diff --git a/cpp/Brewfile b/cpp/Brewfile index 744dcba2d895..89740370cdec 100644 --- a/cpp/Brewfile +++ b/cpp/Brewfile @@ -38,7 +38,6 @@ brew "openssl" brew "pkgconf" brew "protobuf" brew "python" -brew "rapidjson" brew "re2" brew "snappy" brew "thrift" diff --git a/cpp/build-support/sanitizer-disallowed-entries.txt b/cpp/build-support/sanitizer-disallowed-entries.txt index 636cfda233ad..f6900c643db9 100644 --- a/cpp/build-support/sanitizer-disallowed-entries.txt +++ b/cpp/build-support/sanitizer-disallowed-entries.txt @@ -20,6 +20,3 @@ # Seen error: # thirdparty/gmock-1.7.0/include/gmock/gmock-spec-builders.h:1529:12: runtime error: member call on null pointer of type 'testing::internal::ActionResultHolder' fun:*testing*internal*InvokeWith* - -# Workaround for RapidJSON https://github.com/Tencent/rapidjson/issues/1724 -src:*/rapidjson/internal/* diff --git a/cpp/cmake_modules/DefineOptions.cmake b/cpp/cmake_modules/DefineOptions.cmake index b58ab3cd3810..8ce49eb962c3 100644 --- a/cpp/cmake_modules/DefineOptions.cmake +++ b/cpp/cmake_modules/DefineOptions.cmake @@ -365,7 +365,7 @@ takes precedence over ccache if a storage backend is configured" ON) define_option(ARROW_JEMALLOC "Build the Arrow jemalloc-based allocator" OFF) - define_option(ARROW_JSON "Build Arrow with JSON support (requires RapidJSON)" OFF) + define_option(ARROW_JSON "Build Arrow with JSON support" OFF) define_option(ARROW_MIMALLOC "Build the Arrow mimalloc-based allocator" ON) diff --git a/cpp/cmake_modules/FindRapidJSONAlt.cmake b/cpp/cmake_modules/FindRapidJSONAlt.cmake deleted file mode 100644 index 148dd93a78c8..000000000000 --- a/cpp/cmake_modules/FindRapidJSONAlt.cmake +++ /dev/null @@ -1,97 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -if(RapidJSONAlt_FOUND) - return() -endif() - -set(find_package_args) -if(RapidJSONAlt_FIND_VERSION) - list(APPEND find_package_args ${RapidJSONAlt_FIND_VERSION}) -endif() -if(RapidJSONAlt_FIND_QUIETLY) - list(APPEND find_package_args QUIET) -endif() -set(_CMAKE_POLICY_VERSION_MINIMUM_OLD ${CMAKE_POLICY_VERSION_MINIMUM}) -set(CMAKE_POLICY_VERSION_MINIMUM 3.5) -find_package(RapidJSON ${find_package_args}) -set(CMAKE_POLICY_VERSION_MINIMUM ${_CMAKE_POLICY_VERSION_MINIMUM_OLD}) -if(RapidJSON_FOUND) - set(RapidJSONAlt_FOUND TRUE) - if(NOT TARGET RapidJSON) - add_library(RapidJSON INTERFACE IMPORTED) - if(RapidJSON_INCLUDE_DIRS) - target_include_directories(RapidJSON INTERFACE "${RapidJSON_INCLUDE_DIRS}") - else() - target_include_directories(RapidJSON INTERFACE "${RAPIDJSON_INCLUDE_DIRS}") - endif() - endif() - return() -endif() - -if(RapidJSON_ROOT) - find_path(RAPIDJSON_INCLUDE_DIR - NAMES rapidjson/rapidjson.h - PATHS ${RapidJSON_ROOT} - NO_DEFAULT_PATH - PATH_SUFFIXES "include") -else() - find_path(RAPIDJSON_INCLUDE_DIR - NAMES rapidjson/rapidjson.h - PATH_SUFFIXES "include") -endif() - -if(RAPIDJSON_INCLUDE_DIR) - file(READ "${RAPIDJSON_INCLUDE_DIR}/rapidjson/rapidjson.h" RAPIDJSON_H_CONTENT) - string(REGEX MATCH "#define RAPIDJSON_MAJOR_VERSION ([0-9]+)" - RAPIDJSON_MAJOR_VERSION_DEFINITION "${RAPIDJSON_H_CONTENT}") - string(REGEX REPLACE "^.+ ([0-9]+)$" "\\1" RAPIDJSON_MAJOR_VERSION - "${RAPIDJSON_MAJOR_VERSION_DEFINITION}") - string(REGEX MATCH "#define RAPIDJSON_MINOR_VERSION ([0-9]+)" - RAPIDJSON_MINOR_VERSION_DEFINITION "${RAPIDJSON_H_CONTENT}") - string(REGEX REPLACE "^.+ ([0-9]+)$" "\\1" RAPIDJSON_MINOR_VERSION - "${RAPIDJSON_MINOR_VERSION_DEFINITION}") - string(REGEX MATCH "#define RAPIDJSON_PATCH_VERSION ([0-9]+)" - RAPIDJSON_PATCH_VERSION_DEFINITION "${RAPIDJSON_H_CONTENT}") - string(REGEX REPLACE "^.+ ([0-9]+)$" "\\1" RAPIDJSON_PATCH_VERSION - "${RAPIDJSON_PATCH_VERSION_DEFINITION}") - if("${RAPIDJSON_MAJOR_VERSION}" STREQUAL "" - OR "${RAPIDJSON_MINOR_VERSION}" STREQUAL "" - OR "${RAPIDJSON_PATCH_VERSION}" STREQUAL "") - set(RAPIDJSON_VERSION "0.0.0") - else() - set(RAPIDJSON_VERSION - "${RAPIDJSON_MAJOR_VERSION}.${RAPIDJSON_MINOR_VERSION}.${RAPIDJSON_PATCH_VERSION}" - ) - endif() -endif() - -find_package_handle_standard_args( - RapidJSONAlt - REQUIRED_VARS RAPIDJSON_INCLUDE_DIR - VERSION_VAR RAPIDJSON_VERSION) - -if(RapidJSONAlt_FOUND) - if(WIN32 AND "${RAPIDJSON_INCLUDE_DIR}" MATCHES "^/") - # MSYS2 - execute_process(COMMAND "cygpath" "--windows" "${RAPIDJSON_INCLUDE_DIR}" - OUTPUT_VARIABLE RAPIDJSON_INCLUDE_DIR - OUTPUT_STRIP_TRAILING_WHITESPACE) - endif() - add_library(RapidJSON INTERFACE IMPORTED) - target_include_directories(RapidJSON INTERFACE "${RAPIDJSON_INCLUDE_DIR}") -endif() diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 200275a3bec7..ea0c1a1fc723 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -63,7 +63,6 @@ set(ARROW_THIRDPARTY_DEPENDENCIES orc re2 Protobuf - RapidJSON simdjson Snappy Substrait @@ -209,8 +208,6 @@ macro(build_dependency DEPENDENCY_NAME) build_orc() elseif("${DEPENDENCY_NAME}" STREQUAL "Protobuf") build_protobuf() - elseif("${DEPENDENCY_NAME}" STREQUAL "RapidJSON") - build_rapidjson() elseif("${DEPENDENCY_NAME}" STREQUAL "simdjson") build_simdjson() elseif("${DEPENDENCY_NAME}" STREQUAL "re2") @@ -413,10 +410,6 @@ if(ARROW_AZURE) set(ARROW_WITH_AZURE_SDK ON) endif() -if(ARROW_JSON) - set(ARROW_WITH_RAPIDJSON ON) -endif() - if(ARROW_JSON OR ARROW_FLIGHT_SQL_ODBC) set(ARROW_WITH_SIMDJSON ON) endif() @@ -773,14 +766,6 @@ else() "${THIRDPARTY_MIRROR_URL}/re2-${ARROW_RE2_BUILD_VERSION}.tar.gz") endif() -if(DEFINED ENV{ARROW_RAPIDJSON_URL}) - set(RAPIDJSON_SOURCE_URL "$ENV{ARROW_RAPIDJSON_URL}") -else() - set_urls(RAPIDJSON_SOURCE_URL - "https://github.com/miloyip/rapidjson/archive/${ARROW_RAPIDJSON_BUILD_VERSION}.tar.gz" - "${THIRDPARTY_MIRROR_URL}/rapidjson-${ARROW_RAPIDJSON_BUILD_VERSION}.tar.gz") -endif() - if(DEFINED ENV{ARROW_SIMDJSON_URL}) set(SIMDJSON_SOURCE_URL "$ENV{ARROW_SIMDJSON_URL}") else() @@ -2907,46 +2892,6 @@ if(ARROW_WITH_SIMDJSON) endif() endif() -function(build_rapidjson) - list(APPEND CMAKE_MESSAGE_INDENT "RapidJSON: ") - message(STATUS "Building from source") - - fetchcontent_declare(rapidjson - ${FC_DECLARE_COMMON_OPTIONS} OVERRIDE_FIND_PACKAGE - URL ${RAPIDJSON_SOURCE_URL} - URL_HASH "SHA256=${ARROW_RAPIDJSON_BUILD_SHA256_CHECKSUM}") - prepare_fetchcontent() - set(CCACHE_FOUND OFF) - set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib") - set(RAPIDJSON_BUILD_DOC OFF) - set(RAPIDJSON_BUILD_EXAMPLES OFF) - set(RAPIDJSON_BUILD_TESTS OFF) - fetchcontent_makeavailable(rapidjson) - if(CMAKE_VERSION VERSION_LESS 3.28) - set_property(DIRECTORY ${rapidjson_SOURCE_DIR} PROPERTY EXCLUDE_FROM_ALL TRUE) - endif() - - add_library(RapidJSON INTERFACE IMPORTED) - target_include_directories(RapidJSON INTERFACE "${rapidjson_SOURCE_DIR}/include") - add_dependencies(RapidJSON rapidjson) - - set(RAPIDJSON_VENDORED - TRUE - PARENT_SCOPE) - list(POP_BACK CMAKE_MESSAGE_INDENT) -endfunction() - -if(ARROW_WITH_RAPIDJSON) - set(ARROW_RAPIDJSON_REQUIRED_VERSION "1.1.0") - resolve_dependency(RapidJSON - HAVE_ALT - TRUE - REQUIRED_VERSION - ${ARROW_RAPIDJSON_REQUIRED_VERSION} - IS_RUNTIME_DEPENDENCY - FALSE) -endif() - function(build_xsimd) list(APPEND CMAKE_MESSAGE_INDENT "xsimd: ") message(STATUS "Building xsimd from source") diff --git a/cpp/examples/minimal_build/system_dependency.dockerfile b/cpp/examples/minimal_build/system_dependency.dockerfile index ac7cef3496ea..dbd0c6baeb41 100644 --- a/cpp/examples/minimal_build/system_dependency.dockerfile +++ b/cpp/examples/minimal_build/system_dependency.dockerfile @@ -39,6 +39,5 @@ RUN apt-get update -y -q && \ libzstd-dev \ pkg-config \ protobuf-compiler \ - rapidjson-dev \ zlib1g-dev && \ apt-get clean && rm -rf /var/lib/apt/lists* diff --git a/cpp/src/arrow/CMakeLists.txt b/cpp/src/arrow/CMakeLists.txt index 7c6313c326b5..1c0ae9e44ec6 100644 --- a/cpp/src/arrow/CMakeLists.txt +++ b/cpp/src/arrow/CMakeLists.txt @@ -701,11 +701,6 @@ if(ARROW_WITH_OPENTELEMETRY) target_link_libraries(${ARROW_UTIL_TARGET} PRIVATE ${ARROW_OPENTELEMETRY_LIBS}) endforeach() endif() -if(ARROW_WITH_RAPIDJSON) - foreach(ARROW_UTIL_TARGET ${ARROW_UTIL_TARGETS}) - target_link_libraries(${ARROW_UTIL_TARGET} PRIVATE RapidJSON) - endforeach() -endif() if(ARROW_WITH_ZLIB) foreach(ARROW_UTIL_TARGET ${ARROW_UTIL_TARGETS}) target_link_libraries(${ARROW_UTIL_TARGET} PRIVATE ZLIB::ZLIB) @@ -771,8 +766,7 @@ if(ARROW_BUILD_INTEGRATION OR ARROW_BUILD_TESTS) arrow_add_object_library(ARROW_INTEGRATION integration/json_integration.cc integration/json_internal.cc) foreach(ARROW_INTEGRATION_TARGET ${ARROW_INTEGRATION_TARGETS}) - target_link_libraries(${ARROW_INTEGRATION_TARGET} PRIVATE RapidJSON - simdjson::simdjson) + target_link_libraries(${ARROW_INTEGRATION_TARGET} PRIVATE simdjson::simdjson) endforeach() else() set(ARROW_INTEGRATION_TARGET_SHARED) @@ -1133,7 +1127,7 @@ if(ARROW_JSON) json/parser.cc json/reader.cc) foreach(ARROW_JSON_TARGET ${ARROW_JSON_TARGETS}) - target_link_libraries(${ARROW_JSON_TARGET} PRIVATE RapidJSON arrow::simdjson) + target_link_libraries(${ARROW_JSON_TARGET} PRIVATE arrow::simdjson) endforeach() else() set(ARROW_JSON_TARGET_SHARED) diff --git a/cpp/src/arrow/json/CMakeLists.txt b/cpp/src/arrow/json/CMakeLists.txt index de9115497e2b..83e5e1a6bfac 100644 --- a/cpp/src/arrow/json/CMakeLists.txt +++ b/cpp/src/arrow/json/CMakeLists.txt @@ -26,14 +26,12 @@ add_arrow_test(test PREFIX "arrow-json" EXTRA_LINK_LIBS - RapidJSON simdjson::simdjson) add_arrow_benchmark(parser_benchmark PREFIX "arrow-json" EXTRA_LINK_LIBS - RapidJSON simdjson::simdjson) arrow_install_all_headers("arrow/json") diff --git a/cpp/src/arrow/json/meson.build b/cpp/src/arrow/json/meson.build index e5383b90b919..5ce4a7e827e8 100644 --- a/cpp/src/arrow/json/meson.build +++ b/cpp/src/arrow/json/meson.build @@ -25,14 +25,14 @@ exc = executable( 'parser_test.cc', 'reader_test.cc', ], - dependencies: [arrow_test_dep, rapidjson_dep, simdjson_dep], + dependencies: [arrow_test_dep, simdjson_dep], ) test('arrow-json-test', exc) exc = executable( 'arrow-json-parser-benchmark', sources: ['parser_benchmark.cc'], - dependencies: [arrow_benchmark_dep, rapidjson_dep], + dependencies: [arrow_benchmark_dep], ) benchmark('arrow-json-parser-benchmark', exc) @@ -45,7 +45,6 @@ install_headers( 'from_string.h', 'options.h', 'parser.h', - 'rapidjson_defs.h', 'reader.h', 'test_common.h', 'type_fwd.h', diff --git a/cpp/src/arrow/json/rapidjson_defs.h b/cpp/src/arrow/json/rapidjson_defs.h deleted file mode 100644 index 2354c6157263..000000000000 --- a/cpp/src/arrow/json/rapidjson_defs.h +++ /dev/null @@ -1,43 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -// Include this file before including any RapidJSON headers. - -#pragma once - -#define RAPIDJSON_HAS_STDSTRING 1 -#define RAPIDJSON_HAS_CXX11_RVALUE_REFS 1 -#define RAPIDJSON_HAS_CXX11_RANGE_FOR 1 - -// rapidjson will be defined in namespace arrow::rapidjson -#define RAPIDJSON_NAMESPACE arrow::rapidjson -#define RAPIDJSON_NAMESPACE_BEGIN \ - namespace arrow { \ - namespace rapidjson { -#define RAPIDJSON_NAMESPACE_END \ - } \ - } - -// enable SIMD whitespace skipping, if available -#if defined(ARROW_HAVE_SSE4_2) -# define RAPIDJSON_SSE2 1 -# define RAPIDJSON_SSE42 1 -#endif - -#if defined(ARROW_HAVE_NEON) -# define RAPIDJSON_NEON 1 -#endif diff --git a/cpp/src/arrow/meson.build b/cpp/src/arrow/meson.build index ae77a3d99e21..13718cdee431 100644 --- a/cpp/src/arrow/meson.build +++ b/cpp/src/arrow/meson.build @@ -345,15 +345,6 @@ if needs_csv arrow_testing_srcs += ['csv/test_common.cc'] endif -if needs_json or needs_integration - rapidjson_dep = dependency( - 'RapidJSON', - fallback: ['rapidjson', 'rapidjson_dep'], - ) -else - rapidjson_dep = disabler() -endif - azure_dep = disabler() gcs_dep = disabler() s3_dep = disabler() @@ -557,7 +548,7 @@ if needs_json 'json/parser.cc', 'json/reader.cc', ], - 'dependencies': [rapidjson_dep, simdjson_dep], + 'dependencies': [simdjson_dep], }, } endif diff --git a/cpp/subprojects/packagefiles/rapidjson/meson.build b/cpp/subprojects/packagefiles/rapidjson/meson.build deleted file mode 100644 index a407ed790146..000000000000 --- a/cpp/subprojects/packagefiles/rapidjson/meson.build +++ /dev/null @@ -1,20 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -project('rapidjson', 'cpp') - -rapidjson_dep = declare_dependency(include_directories: 'include') diff --git a/cpp/subprojects/rapidjson.wrap b/cpp/subprojects/rapidjson.wrap deleted file mode 100644 index d48fd999ba8d..000000000000 --- a/cpp/subprojects/rapidjson.wrap +++ /dev/null @@ -1,27 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -[wrap-file] -directory = rapidjson-232389d4f1012dddec4ef84861face2d2ba85709 -source_url = https://github.com/Tencent/rapidjson/archive/232389d4f1012dddec4ef84861face2d2ba85709.tar.gz -source_filename = rapidjson-232389d4f1012dddec4ef84861face2d2ba85709.tar.gz -source_hash = b9290a9a6d444c8e049bd589ab804e0ccf2b05dc5984a19ed5ae75d090064806 -source_fallback_url = https://apache.jfrog.io/artifactory/arrow/thirdparty/7.0.0/rapidjson-232389d4f1012dddec4ef84861face2d2ba85709.tar.gz -patch_directory = rapidjson - -[provide] -rapidjson = rapidjson_dep diff --git a/cpp/thirdparty/versions.txt b/cpp/thirdparty/versions.txt index 79a14cacb74d..12225842fcf6 100644 --- a/cpp/thirdparty/versions.txt +++ b/cpp/thirdparty/versions.txt @@ -95,11 +95,6 @@ ARROW_ORC_BUILD_VERSION=2.2.1 ARROW_ORC_BUILD_SHA256_CHECKSUM=52fc762332442e8b05d7182f8c035f9e04d945b9a52be22ab69f28b3f37d4500 ARROW_PROTOBUF_BUILD_VERSION=v36.2 ARROW_PROTOBUF_BUILD_SHA256_CHECKSUM=3d9642a662d10e68ebae5e53f14dcce5105684212d5078f8e0d47d1ab3ae6b64 -# Because of https://github.com/Tencent/rapidjson/pull/1323, we require -# a pre-release version of RapidJSON to build with GCC 8 without -# warnings. -ARROW_RAPIDJSON_BUILD_VERSION=232389d4f1012dddec4ef84861face2d2ba85709 -ARROW_RAPIDJSON_BUILD_SHA256_CHECKSUM=b9290a9a6d444c8e049bd589ab804e0ccf2b05dc5984a19ed5ae75d090064806 # RE2 2023-03-01 is pinned to avoid Abseil dependency. Versions after 2023-06-01 # require Abseil, which would add significant build time and complexity, particularly # for CRAN builds. This version includes musl libc support (GH-48010). @@ -170,7 +165,6 @@ DEPENDENCIES=( "ARROW_OPENTELEMETRY_PROTO_URL opentelemetry-proto-${ARROW_OPENTELEMETRY_PROTO_BUILD_VERSION}.tar.gz https://github.com/open-telemetry/opentelemetry-proto/archive/refs/tags/${ARROW_OPENTELEMETRY_PROTO_BUILD_VERSION}.tar.gz" "ARROW_ORC_URL orc-${ARROW_ORC_BUILD_VERSION}.tar.gz https://www.apache.org/dyn/closer.lua/orc/orc-${ARROW_ORC_BUILD_VERSION}/orc-${ARROW_ORC_BUILD_VERSION}.tar.gz?action=download" "ARROW_PROTOBUF_URL protobuf-${ARROW_PROTOBUF_BUILD_VERSION}.tar.gz https://github.com/google/protobuf/releases/download/${ARROW_PROTOBUF_BUILD_VERSION}/protobuf-${ARROW_PROTOBUF_BUILD_VERSION:1}.tar.gz" - "ARROW_RAPIDJSON_URL rapidjson-${ARROW_RAPIDJSON_BUILD_VERSION}.tar.gz https://github.com/miloyip/rapidjson/archive/${ARROW_RAPIDJSON_BUILD_VERSION}.tar.gz" "ARROW_SIMDJSON_URL simdjson-${ARROW_SIMDJSON_BUILD_VERSION}.tar.gz https://github.com/simdjson/simdjson/archive/refs/tags/${ARROW_SIMDJSON_BUILD_VERSION}.tar.gz" "ARROW_RE2_URL re2-${ARROW_RE2_BUILD_VERSION}.tar.gz https://github.com/google/re2/archive/${ARROW_RE2_BUILD_VERSION}.tar.gz" "ARROW_S2N_TLS_URL s2n-${ARROW_S2N_TLS_BUILD_VERSION}.tar.gz https://github.com/aws/s2n-tls/archive/${ARROW_S2N_TLS_BUILD_VERSION}.tar.gz" diff --git a/cpp/vcpkg.json b/cpp/vcpkg.json index 5d1d5c019e08..39073f5cc084 100644 --- a/cpp/vcpkg.json +++ b/cpp/vcpkg.json @@ -46,7 +46,6 @@ "openssl", "orc", "protobuf", - "rapidjson", "re2", "simdjson", "snappy", diff --git a/dev/conbench_envs/README.md b/dev/conbench_envs/README.md index 7fab50397480..856715bb1581 100644 --- a/dev/conbench_envs/README.md +++ b/dev/conbench_envs/README.md @@ -83,7 +83,6 @@ Here are steps how `@ursabot` benchmark builds use `benchmarks.env` and `hooks.s ninja-build \ pkg-config \ protobuf-compiler \ - rapidjson-dev \ tzdata \ wget && \ apt-get clean && \ diff --git a/dev/tasks/homebrew-formulae/apache-arrow.rb b/dev/tasks/homebrew-formulae/apache-arrow.rb index dc7d3f58641d..fb4b982d86c3 100644 --- a/dev/tasks/homebrew-formulae/apache-arrow.rb +++ b/dev/tasks/homebrew-formulae/apache-arrow.rb @@ -37,7 +37,6 @@ class ApacheArrow < Formula depends_on "boost" => :build depends_on "cmake" => :build depends_on "gflags" => :build - depends_on "rapidjson" => :build depends_on "xsimd" => :build depends_on "abseil" depends_on "aws-crt-cpp" diff --git a/dev/tasks/linux-packages/apache-arrow/apt/debian-forky/Dockerfile b/dev/tasks/linux-packages/apache-arrow/apt/debian-forky/Dockerfile index c458fc6b4836..030ad4cbf5a9 100644 --- a/dev/tasks/linux-packages/apache-arrow/apt/debian-forky/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/apt/debian-forky/Dockerfile @@ -83,7 +83,6 @@ RUN \ protobuf-compiler-grpc \ python3-dev \ python3-pip \ - rapidjson-dev \ tzdata \ valac \ zlib1g-dev && \ diff --git a/dev/tasks/linux-packages/apache-arrow/apt/debian-trixie/Dockerfile b/dev/tasks/linux-packages/apache-arrow/apt/debian-trixie/Dockerfile index 601b920d43fb..b5d682d7379b 100644 --- a/dev/tasks/linux-packages/apache-arrow/apt/debian-trixie/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/apt/debian-trixie/Dockerfile @@ -83,7 +83,6 @@ RUN \ protobuf-compiler-grpc \ python3-dev \ python3-pip \ - rapidjson-dev \ tzdata \ valac \ zlib1g-dev && \ diff --git a/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-jammy/Dockerfile b/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-jammy/Dockerfile index a1f349aec8f4..f8413b5a0cd1 100644 --- a/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-jammy/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-jammy/Dockerfile @@ -76,7 +76,6 @@ RUN \ python3-dev \ python3-pip \ python3-setuptools \ - rapidjson-dev \ tzdata \ valac \ zlib1g-dev && \ diff --git a/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-noble/Dockerfile b/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-noble/Dockerfile index 5fe19b06deb9..ddb48bae91ba 100644 --- a/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-noble/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-noble/Dockerfile @@ -78,7 +78,6 @@ RUN \ python3-dev \ python3-pip \ python3-setuptools \ - rapidjson-dev \ tzdata \ valac \ zlib1g-dev && \ diff --git a/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-resolute/Dockerfile b/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-resolute/Dockerfile index 5f8c15f1881c..d2d0e1ff3183 100644 --- a/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-resolute/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-resolute/Dockerfile @@ -78,7 +78,6 @@ RUN \ python3-dev \ python3-pip \ python3-setuptools \ - rapidjson-dev \ tzdata \ valac \ zlib1g-dev && \ diff --git a/dev/tasks/linux-packages/apache-arrow/yum/almalinux-10/Dockerfile b/dev/tasks/linux-packages/apache-arrow/yum/almalinux-10/Dockerfile index d50e6455df41..5e54433450c8 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/almalinux-10/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/yum/almalinux-10/Dockerfile @@ -53,7 +53,6 @@ RUN \ pkg-config \ python3 \ python3-pip \ - rapidjson-devel \ re2-devel \ rpmdevtools \ snappy-devel \ diff --git a/dev/tasks/linux-packages/apache-arrow/yum/almalinux-8/Dockerfile b/dev/tasks/linux-packages/apache-arrow/yum/almalinux-8/Dockerfile index 07ce9e2dd323..7d4e97a9480b 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/almalinux-8/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/yum/almalinux-8/Dockerfile @@ -58,7 +58,6 @@ RUN \ python3.12 \ python3.12-pip \ re2-devel \ - # rapidjson-devel \ rpmdevtools \ snappy-devel \ tar \ diff --git a/dev/tasks/linux-packages/apache-arrow/yum/almalinux-9/Dockerfile b/dev/tasks/linux-packages/apache-arrow/yum/almalinux-9/Dockerfile index cb69cd01bdc5..1c1c6b18adfd 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/almalinux-9/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/yum/almalinux-9/Dockerfile @@ -55,7 +55,6 @@ RUN \ python3 \ python3-pip \ re2-devel \ - rapidjson-devel \ rpmdevtools \ snappy-devel \ tar \ diff --git a/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2023/Dockerfile b/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2023/Dockerfile index ba025a441b5b..07a1bc23af11 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2023/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/yum/amazon-linux-2023/Dockerfile @@ -52,7 +52,6 @@ RUN \ protobuf-compiler \ protobuf-devel \ python3-pip \ - rapidjson-devel \ re2-devel \ rpmdevtools \ snappy-devel \ diff --git a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in index ef3e9d5a4f38..629008715fdc 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in +++ b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in @@ -60,7 +60,6 @@ %define have_grpc (%{_rhel} >= 10 || %{is_amazon_linux}) %define have_orc (%{_rhel} >= 10) -%define have_rapidjson (%{_rhel} != 8) %define have_thrift (!%{is_amazon_linux}) %define have_uriparser (!%{is_amazon_linux}) %define have_utf8proc (%{_rhel} >= 9 || %{is_amazon_linux}) @@ -107,9 +106,6 @@ BuildRequires: ncurses-devel BuildRequires: ninja-build BuildRequires: openssl-devel BuildRequires: pkgconfig -%if %{have_rapidjson} -BuildRequires: rapidjson-devel -%endif BuildRequires: re2-devel BuildRequires: snappy-devel %if %{have_thrift} @@ -288,9 +284,6 @@ Requires: openssl-devel %if %{have_orc} Requires: liborc-devel %endif -%if %{have_rapidjson} -Requires: rapidjson-devel -%endif Requires: re2-devel Requires: snappy-devel %if %{have_uriparser} diff --git a/dev/tasks/linux-packages/apache-arrow/yum/centos-9-stream/Dockerfile b/dev/tasks/linux-packages/apache-arrow/yum/centos-9-stream/Dockerfile index ecbfd69564f4..e2c5153cd8a4 100644 --- a/dev/tasks/linux-packages/apache-arrow/yum/centos-9-stream/Dockerfile +++ b/dev/tasks/linux-packages/apache-arrow/yum/centos-9-stream/Dockerfile @@ -52,7 +52,6 @@ RUN \ python3 \ python3-pip \ re2-devel \ - rapidjson-devel \ rpmdevtools \ snappy-devel \ tar \ diff --git a/dev/tasks/tasks.yml b/dev/tasks/tasks.yml index 0e7d7bd296b9..6f449c8a9f5c 100644 --- a/dev/tasks/tasks.yml +++ b/dev/tasks/tasks.yml @@ -384,9 +384,7 @@ tasks: env: GCC: 14 UBUNTU: 24.04 - # rapidjson 1.1.0 has an error caught by gcc 14. - # https://github.com/Tencent/rapidjson/issues/718 - flags: -e CC=gcc-14 -e CXX=g++-14 -e RapidJSON_SOURCE=BUNDLED + flags: -e CC=gcc-14 -e CXX=g++-14 image: ubuntu-cpp {% for debian_version in ["13"] %} diff --git a/docs/source/developers/cpp/building.rst b/docs/source/developers/cpp/building.rst index b284e2d7c9b2..88dd7c2a1223 100644 --- a/docs/source/developers/cpp/building.rst +++ b/docs/source/developers/cpp/building.rst @@ -124,7 +124,6 @@ On MSYS2: mingw-w64-${MSYSTEM_CARCH}-lz4 \ mingw-w64-${MSYSTEM_CARCH}-protobuf \ mingw-w64-${MSYSTEM_CARCH}-python3-numpy \ - mingw-w64-${MSYSTEM_CARCH}-rapidjson \ mingw-w64-${MSYSTEM_CARCH}-snappy \ mingw-w64-${MSYSTEM_CARCH}-thrift \ mingw-w64-${MSYSTEM_CARCH}-zlib \ @@ -504,7 +503,6 @@ The build system supports a number of third-party dependencies * ``ORC``: for Apache ORC format support * ``re2``: for compute kernels and Gandiva, a dependency of gRPC * ``Protobuf``: Google Protocol Buffers, for data serialization - * ``RapidJSON``: for data serialization * ``Snappy``: for data compression * ``Thrift``: Apache Thrift, for data serialization * ``uriparser``: for URI parsing, used by core Arrow