diff --git a/ci/scripts/PKGBUILD b/ci/scripts/PKGBUILD index 02ae876109da9..23a78cb2fb2b1 100644 --- a/ci/scripts/PKGBUILD +++ b/ci/scripts/PKGBUILD @@ -24,8 +24,7 @@ pkgdesc="Apache Arrow is a cross-language development platform for in-memory dat arch=("any") url="https://arrow.apache.org/" license=("Apache-2.0") -depends=("${MINGW_PACKAGE_PREFIX}-boost" - "${MINGW_PACKAGE_PREFIX}-thrift" +depends=("${MINGW_PACKAGE_PREFIX}-thrift" "${MINGW_PACKAGE_PREFIX}-snappy" "${MINGW_PACKAGE_PREFIX}-zlib" "${MINGW_PACKAGE_PREFIX}-lz4" @@ -75,7 +74,6 @@ build() { ${MINGW_PREFIX}/bin/cmake.exe \ ${ARROW_CPP_DIR} \ -G "MSYS Makefiles" \ - -DARROW_BOOST_USE_SHARED=OFF \ -DARROW_BUILD_SHARED=OFF \ -DARROW_BUILD_STATIC=ON \ -DARROW_BUILD_UTILITIES=OFF \ diff --git a/ci/scripts/r_windows_build.sh b/ci/scripts/r_windows_build.sh index 2c2e07608aa80..f0eb9fe2b28c9 100755 --- a/ci/scripts/r_windows_build.sh +++ b/ci/scripts/r_windows_build.sh @@ -43,7 +43,6 @@ export PKG_CONFIG="/${MINGW_PREFIX}/bin/pkg-config --static" cp $ARROW_HOME/ci/scripts/PKGBUILD . export PKGEXT='.pkg.tar.xz' # pacman default changed to .zst in 2020, but keep the old ext for compat -unset BOOST_ROOT printenv makepkg-mingw --noconfirm --noprogressbar --skippgpcheck --nocheck --syncdeps --cleanbuild diff --git a/cpp/build-support/trim-boost.sh b/cpp/build-support/trim-boost.sh new file mode 100755 index 0000000000000..b575d5fd2d766 --- /dev/null +++ b/cpp/build-support/trim-boost.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# +# 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. +# + +# This script is used to make the subset of boost that we actually use, +# so that we don't have to download the whole big boost project when we build +# boost from source. +# +# After running this script, run upload-boost.sh to put the bundle on bintray + +set -eu + +# if version is not defined by the caller, set a default. +: ${BOOST_VERSION:=1.71.0} +: ${BOOST_FILE:=boost_${BOOST_VERSION//./_}} +: ${BOOST_URL:=https://dl.bintray.com/boostorg/release/${BOOST_VERSION}/source/${BOOST_FILE}.tar.gz} + +# Arrow tests require these +BOOST_LIBS="system.hpp filesystem.hpp" +# Add these to be able to build those +BOOST_LIBS="$BOOST_LIBS config build boost_install headers log predef" +# Parquet needs this (if using gcc < 4.9) +BOOST_LIBS="$BOOST_LIBS regex.hpp" +# Gandiva needs these +BOOST_LIBS="$BOOST_LIBS functional/hash.hpp multiprecision/cpp_int.hpp" +# These are for Thrift when Thrift_SOURCE=BUNDLED +BOOST_LIBS="$BOOST_LIBS algorithm/string.hpp locale.hpp noncopyable.hpp numeric/conversion/cast.hpp scope_exit.hpp scoped_array.hpp shared_array.hpp tokenizer.hpp version.hpp" + +if [ ! -d ${BOOST_FILE} ]; then + curl -L "${BOOST_URL}" > ${BOOST_FILE}.tar.gz + tar -xzf ${BOOST_FILE}.tar.gz +fi + +pushd ${BOOST_FILE} + +if [ ! -f "dist/bin/bcp" ]; then + ./bootstrap.sh + ./b2 tools/bcp +fi +mkdir -p ${BOOST_FILE} +./dist/bin/bcp ${BOOST_LIBS} ${BOOST_FILE} + +tar -czf ${BOOST_FILE}.tar.gz ${BOOST_FILE}/ +# Resulting tarball is in ${BOOST_FILE}/${BOOST_FILE}.tar.gz + +popd diff --git a/cpp/build-support/upload-boost.sh b/cpp/build-support/upload-boost.sh new file mode 100755 index 0000000000000..bf040085a9235 --- /dev/null +++ b/cpp/build-support/upload-boost.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# +# 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. +# + +# This assumes you've just run cpp/build-support/trim-boost.sh, so the file +# to upload is at ${BOOST_FILE}/${BOOST_FILE}.tar.gz +# +# Also, you must have a bintray account on the "ursalabs" organization and +# set the BINTRAY_USER and BINTRAY_APIKEY env vars. + +set -eu + +# if version is not defined by the caller, set a default. +: ${BOOST_VERSION:=1.71.0} +: ${BOOST_FILE:=boost_${BOOST_VERSION//./_}} +: ${DST_URL:=https://api.bintray.com/content/ursalabs/arrow-boost/arrow-boost/latest} + +if [ "$BINTRAY_USER" = "" ]; then + echo "Must set BINTRAY_USER" + exit 1 +fi +if [ "$BINTRAY_APIKEY" = "" ]; then + echo "Must set BINTRAY_APIKEY" + exit 1 +fi + +upload_file() { + if [ -f "$1" ]; then + echo "PUT ${DST_URL}/$1?override=1&publish=1" + curl -sS -u "${BINTRAY_USER}:${BINTRAY_APIKEY}" -X PUT "${DST_URL}/$1?override=1&publish=1" --data-binary "@$1" + else + echo "$1 not found" + fi +} + +pushd ${BOOST_FILE} +upload_file ${BOOST_FILE}.tar.gz +popd diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake index 73f9777eac577..9d3dcf90a2811 100644 --- a/cpp/cmake_modules/ThirdpartyToolchain.cmake +++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake @@ -279,10 +279,22 @@ if(DEFINED ENV{ARROW_BOOST_URL}) else() string(REPLACE "." "_" ARROW_BOOST_BUILD_VERSION_UNDERSCORES ${ARROW_BOOST_BUILD_VERSION}) + # This is the trimmed boost bundle we maintain. + # See cpp/build_support/trim-boost.sh set( BOOST_SOURCE_URL - "https://dl.bintray.com/boostorg/release/${ARROW_BOOST_BUILD_VERSION}/source/boost_${ARROW_BOOST_BUILD_VERSION_UNDERSCORES}.tar.gz" + "https://dl.bintray.com/ursalabs/arrow-boost/boost_${ARROW_BOOST_BUILD_VERSION_UNDERSCORES}.tar.gz" ) + if(NOT CMAKE_VERSION VERSION_LESS 3.7) + # Append as a backup URL the full source from boostorg + # Feature only available starting in 3.7 + # (and VERSION_GREATER_EQUAL also only available starting in 3.7) + list( + APPEND + BOOST_SOURCE_URL + "https://dl.bintray.com/boostorg/release/${ARROW_BOOST_BUILD_VERSION}/source/boost_${ARROW_BOOST_BUILD_VERSION_UNDERSCORES}.tar.gz" + ) + endif() endif() if(DEFINED ENV{ARROW_BROTLI_URL}) @@ -642,10 +654,25 @@ set(Boost_ADDITIONAL_VERSIONS "1.60.0" "1.60") +# Thrift needs Boost if we're building the bundled version, +# so we first need to determine whether we're building it +if(ARROW_WITH_THRIFT AND Thrift_SOURCE STREQUAL "AUTO") + find_package(Thrift 0.11.0 MODULE) + if(NOT Thrift_FOUND AND NOT THRIFT_FOUND) + set(Thrift_SOURCE "BUNDLED") + endif() +endif() + # - Parquet requires boost only with gcc 4.8 (because of missing std::regex). # - Gandiva has a compile-time (header-only) dependency on Boost, not runtime. # - Tests needs Boost at runtime. -if(ARROW_BUILD_INTEGRATION OR ARROW_BUILD_TESTS OR ARROW_GANDIVA OR ARROW_PARQUET) +if(ARROW_BUILD_INTEGRATION + OR ARROW_BUILD_TESTS + OR ARROW_GANDIVA + OR (ARROW_WITH_THRIFT AND Thrift_SOURCE STREQUAL "BUNDLED") + OR (ARROW_PARQUET + AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "4.9")) set(ARROW_BOOST_REQUIRED TRUE) else() set(ARROW_BOOST_REQUIRED FALSE) @@ -1097,8 +1124,12 @@ macro(build_thrift) endmacro() if(ARROW_WITH_THRIFT) - # Thrift c++ code generated by 0.13 requires 0.11 or greater - resolve_dependency_with_version(Thrift 0.11.0) + # We already may have looked for Thrift earlier, when considering whether + # to build Boost, so don't look again if already found. + if(NOT Thrift_FOUND AND NOT THRIFT_FOUND) + # Thrift c++ code generated by 0.13 requires 0.11 or greater + resolve_dependency_with_version(Thrift 0.11.0) + endif() # TODO: Don't use global includes but rather target_include_directories include_directories(SYSTEM ${THRIFT_INCLUDE_DIR}) endif() diff --git a/cpp/src/arrow/stl_test.cc b/cpp/src/arrow/stl_test.cc index 47b60067d999c..a16e0f610e019 100644 --- a/cpp/src/arrow/stl_test.cc +++ b/cpp/src/arrow/stl_test.cc @@ -24,8 +24,6 @@ #include #include -#include -#include #include "arrow/memory_pool.h" #include "arrow/stl.h" @@ -34,17 +32,11 @@ #include "arrow/testing/gtest_util.h" #include "arrow/type.h" #include "arrow/type_fwd.h" +#include "arrow/util/optional.h" using primitive_types_tuple = std::tuple; -using boost_optional_types_tuple = - std::tuple, boost::optional, - boost::optional, boost::optional, - boost::optional, boost::optional, - boost::optional, boost::optional, - boost::optional, boost::optional>; - using raw_pointer_optional_types_tuple = std::tuple; @@ -108,6 +100,12 @@ struct TestInt32Type { namespace arrow { +using optional_types_tuple = + std::tuple, util::optional, util::optional, + util::optional, util::optional, util::optional, + util::optional, util::optional, util::optional, + util::optional>; + template <> struct CTypeTraits { using ArrowType = ::arrow::StringType; @@ -248,15 +246,15 @@ TEST(TestTableFromTupleVector, ListType) { } TEST(TestTableFromTupleVector, ReferenceTuple) { - using boost::adaptors::transform; - std::vector names{"column1", "column2", "column3", "column4", "column5", "column6", "column7", "column8", "column9", "column10"}; std::vector rows{ {-1, -2, -3, -4, 1, 2, 3, 4, true, std::string("Tests")}, {-10, -20, -30, -40, 10, 20, 30, 40, false, std::string("Other")}}; - auto rng_rows = - transform(rows, [](const CustomType& c) -> decltype(c.tie()) { return c.tie(); }); + std::vector rng_rows{ + rows[0].tie(), + rows[1].tie(), + }; std::shared_ptr table; ASSERT_OK(TableFromTupleRange(default_memory_pool(), rng_rows, names, &table)); @@ -289,12 +287,13 @@ TEST(TestTableFromTupleVector, ReferenceTuple) { TEST(TestTableFromTupleVector, NullableTypesWithBoostOptional) { std::vector names{"column1", "column2", "column3", "column4", "column5", "column6", "column7", "column8", "column9", "column10"}; - using types_tuple = boost_optional_types_tuple; + using types_tuple = optional_types_tuple; std::vector rows{ types_tuple(-1, -2, -3, -4, 1, 2, 3, 4, true, std::string("Tests")), types_tuple(-10, -20, -30, -40, 10, 20, 30, 40, false, std::string("Other")), - types_tuple(boost::none, boost::none, boost::none, boost::none, boost::none, - boost::none, boost::none, boost::none, boost::none, boost::none), + types_tuple(util::nullopt, util::nullopt, util::nullopt, util::nullopt, + util::nullopt, util::nullopt, util::nullopt, util::nullopt, + util::nullopt, util::nullopt), }; std::shared_ptr
table; ASSERT_OK(TableFromTupleRange(default_memory_pool(), rows, names, &table)); diff --git a/cpp/src/arrow/util/bit_util_test.cc b/cpp/src/arrow/util/bit_util_test.cc index a48a50365c7c5..a63844b530005 100644 --- a/cpp/src/arrow/util/bit_util_test.cc +++ b/cpp/src/arrow/util/bit_util_test.cc @@ -28,8 +28,6 @@ #include -#include // IWYU pragma: export - #include "arrow/buffer.h" #include "arrow/memory_pool.h" #include "arrow/testing/gtest_common.h" @@ -920,12 +918,10 @@ TEST(BitUtil, CoveringBytes) { } TEST(BitUtil, TrailingBits) { - EXPECT_EQ(BitUtil::TrailingBits(BOOST_BINARY(1 1 1 1 1 1 1 1), 0), 0); - EXPECT_EQ(BitUtil::TrailingBits(BOOST_BINARY(1 1 1 1 1 1 1 1), 1), 1); - EXPECT_EQ(BitUtil::TrailingBits(BOOST_BINARY(1 1 1 1 1 1 1 1), 64), - BOOST_BINARY(1 1 1 1 1 1 1 1)); - EXPECT_EQ(BitUtil::TrailingBits(BOOST_BINARY(1 1 1 1 1 1 1 1), 100), - BOOST_BINARY(1 1 1 1 1 1 1 1)); + EXPECT_EQ(BitUtil::TrailingBits(0xFF, 0), 0); + EXPECT_EQ(BitUtil::TrailingBits(0xFF, 1), 1); + EXPECT_EQ(BitUtil::TrailingBits(0xFF, 64), 0xFF); + EXPECT_EQ(BitUtil::TrailingBits(0xFF, 100), 0xFF); EXPECT_EQ(BitUtil::TrailingBits(0, 1), 0); EXPECT_EQ(BitUtil::TrailingBits(0, 64), 0); EXPECT_EQ(BitUtil::TrailingBits(1LL << 63, 0), 0); diff --git a/cpp/src/arrow/util/rle_encoding_test.cc b/cpp/src/arrow/util/rle_encoding_test.cc index fb2281d51a042..b9e62b198b21a 100644 --- a/cpp/src/arrow/util/rle_encoding_test.cc +++ b/cpp/src/arrow/util/rle_encoding_test.cc @@ -24,8 +24,6 @@ #include -#include // IWYU pragma: export - #include "arrow/array.h" #include "arrow/buffer.h" #include "arrow/testing/random.h" @@ -47,11 +45,11 @@ TEST(BitArray, TestBool) { // Write alternating 0's and 1's for (int i = 0; i < 8; ++i) { - bool result = writer.PutValue(i % 2, 1); - EXPECT_TRUE(result); + EXPECT_TRUE(writer.PutValue(i % 2, 1)); } writer.Flush(); - EXPECT_EQ((int)buffer[0], BOOST_BINARY(1 0 1 0 1 0 1 0)); + + EXPECT_EQ(buffer[0], 0xAA /* 0b10101010 */); // Write 00110011 for (int i = 0; i < 8; ++i) { @@ -72,8 +70,8 @@ TEST(BitArray, TestBool) { writer.Flush(); // Validate the exact bit value - EXPECT_EQ((int)buffer[0], BOOST_BINARY(1 0 1 0 1 0 1 0)); - EXPECT_EQ((int)buffer[1], BOOST_BINARY(1 1 0 0 1 1 0 0)); + EXPECT_EQ(buffer[0], 0xAA /* 0b10101010 */); + EXPECT_EQ(buffer[1], 0xCC /* 0b11001100 */); // Use the reader and validate BitUtil::BitReader reader(buffer, len); @@ -285,7 +283,7 @@ TEST(Rle, SpecificSequences) { } for (int width = 9; width <= MAX_WIDTH; ++width) { - ValidateRle(values, width, NULL, + ValidateRle(values, width, nullptr, 2 * (1 + static_cast(BitUtil::CeilDiv(width, 8)))); } @@ -296,16 +294,16 @@ TEST(Rle, SpecificSequences) { int num_groups = static_cast(BitUtil::CeilDiv(100, 8)); expected_buffer[0] = static_cast((num_groups << 1) | 1); for (int i = 1; i <= 100 / 8; ++i) { - expected_buffer[i] = BOOST_BINARY(1 0 1 0 1 0 1 0); + expected_buffer[i] = 0xAA /* 0b10101010 */; } // Values for the last 4 0 and 1's. The upper 4 bits should be padded to 0. - expected_buffer[100 / 8 + 1] = BOOST_BINARY(0 0 0 0 1 0 1 0); + expected_buffer[100 / 8 + 1] = 0x0A /* 0b00001010 */; // num_groups and expected_buffer only valid for bit width = 1 ValidateRle(values, 1, expected_buffer, 1 + num_groups); for (int width = 2; width <= MAX_WIDTH; ++width) { int num_values = static_cast(BitUtil::CeilDiv(100, 8)) * 8; - ValidateRle(values, width, NULL, + ValidateRle(values, width, nullptr, 1 + static_cast(BitUtil::CeilDiv(width * num_values, 8))); } } diff --git a/cpp/src/gandiva/cache.h b/cpp/src/gandiva/cache.h index c4000e7dd6dea..83ffa9b9a64aa 100644 --- a/cpp/src/gandiva/cache.h +++ b/cpp/src/gandiva/cache.h @@ -28,11 +28,11 @@ class Cache { public: explicit Cache(size_t capacity = CACHE_SIZE) : cache_(capacity) {} ValueType GetModule(KeyType cache_key) { - boost::optional result; + arrow::util::optional result; mtx_.lock(); result = cache_.get(cache_key); mtx_.unlock(); - return result != boost::none ? *result : nullptr; + return result != arrow::util::nullopt ? *result : nullptr; } void PutModule(KeyType cache_key, ValueType module) { diff --git a/cpp/src/gandiva/configuration.cc b/cpp/src/gandiva/configuration.cc index 0c6a33fc00efe..e4c3286ed43a2 100644 --- a/cpp/src/gandiva/configuration.cc +++ b/cpp/src/gandiva/configuration.cc @@ -17,7 +17,7 @@ #include "gandiva/configuration.h" -#include "boost/functional/hash.hpp" +#include namespace gandiva { diff --git a/cpp/src/gandiva/decimal_xlarge.cc b/cpp/src/gandiva/decimal_xlarge.cc index 392c14cd6e34f..2db0e09c3231c 100644 --- a/cpp/src/gandiva/decimal_xlarge.cc +++ b/cpp/src/gandiva/decimal_xlarge.cc @@ -24,9 +24,9 @@ #include "gandiva/decimal_xlarge.h" +#include #include #include -#include "boost/multiprecision/cpp_int.hpp" #include "arrow/util/basic_decimal.h" #include "gandiva/decimal_type_util.h" diff --git a/cpp/src/gandiva/expr_validator.h b/cpp/src/gandiva/expr_validator.h index d6a591d12530e..88500635f2d12 100644 --- a/cpp/src/gandiva/expr_validator.h +++ b/cpp/src/gandiva/expr_validator.h @@ -20,8 +20,8 @@ #include #include +#include #include "arrow/status.h" -#include "boost/functional/hash.hpp" #include "gandiva/arrow.h" #include "gandiva/expression.h" diff --git a/cpp/src/gandiva/expression_registry.cc b/cpp/src/gandiva/expression_registry.cc index ae60a2913a642..0cf4bcfc4255a 100644 --- a/cpp/src/gandiva/expression_registry.cc +++ b/cpp/src/gandiva/expression_registry.cc @@ -17,8 +17,6 @@ #include "gandiva/expression_registry.h" -#include "boost/iterator/transform_iterator.hpp" - #include "gandiva/function_registry.h" #include "gandiva/llvm_types.h" diff --git a/cpp/src/gandiva/filter_cache_key.h b/cpp/src/gandiva/filter_cache_key.h index 64fa86ed29228..64825149e6eda 100644 --- a/cpp/src/gandiva/filter_cache_key.h +++ b/cpp/src/gandiva/filter_cache_key.h @@ -21,7 +21,7 @@ #include #include -#include "boost/functional/hash.hpp" +#include #include "gandiva/arrow.h" #include "gandiva/filter.h" diff --git a/cpp/src/gandiva/function_signature.cc b/cpp/src/gandiva/function_signature.cc index da988807217eb..2a4117fe650fb 100644 --- a/cpp/src/gandiva/function_signature.cc +++ b/cpp/src/gandiva/function_signature.cc @@ -17,7 +17,7 @@ #include -#include "boost/functional/hash.hpp" +#include namespace gandiva { diff --git a/cpp/src/gandiva/lru_cache.h b/cpp/src/gandiva/lru_cache.h index cfb3fc560bc7c..6602116b0a06b 100644 --- a/cpp/src/gandiva/lru_cache.h +++ b/cpp/src/gandiva/lru_cache.h @@ -21,7 +21,7 @@ #include #include -#include +#include "arrow/util/optional.h" // modified from boost LRU cache -> the boost cache supported only an // ordered map. @@ -70,12 +70,12 @@ class LruCache { } } - boost::optional get(const key_type& key) { + arrow::util::optional get(const key_type& key) { // lookup value in the cache typename map_type::iterator value_for_key = map_.find(key); if (value_for_key == map_.end()) { // value not in cache - return boost::none; + return arrow::util::nullopt; } // return the value, but first update its place in the most diff --git a/cpp/src/gandiva/lru_cache_test.cc b/cpp/src/gandiva/lru_cache_test.cc index 8ac04c3461b7e..06c86d6903249 100644 --- a/cpp/src/gandiva/lru_cache_test.cc +++ b/cpp/src/gandiva/lru_cache_test.cc @@ -50,7 +50,7 @@ TEST_F(TestLruCache, TestEvict) { cache_.insert(TestCacheKey(3), "hello"); // should have evicted key 1 ASSERT_EQ(2, cache_.size()); - ASSERT_EQ(cache_.get(TestCacheKey(1)), boost::none); + ASSERT_EQ(cache_.get(TestCacheKey(1)), arrow::util::nullopt); } TEST_F(TestLruCache, TestLruBehavior) { diff --git a/cpp/src/parquet/arrow/reader_internal.cc b/cpp/src/parquet/arrow/reader_internal.cc index dbbe0b066d74e..e09df37eeb3f6 100644 --- a/cpp/src/parquet/arrow/reader_internal.cc +++ b/cpp/src/parquet/arrow/reader_internal.cc @@ -27,8 +27,6 @@ #include #include -#include - #include "arrow/array.h" #include "arrow/builder.h" #include "arrow/compute/kernel.h" @@ -44,6 +42,7 @@ #include "arrow/util/checked_cast.h" #include "arrow/util/int_util.h" #include "arrow/util/logging.h" +#include "arrow/util/string_view.h" #include "arrow/util/ubsan.h" #include "parquet/arrow/reader.h" @@ -377,7 +376,8 @@ Status PopulateLeaf(int column_index, const std::shared_ptr& field, // If the name is array or ends in _tuple, this should be a list of struct // even for single child elements. bool HasStructListName(const GroupNode& node) { - return node.name() == "array" || boost::algorithm::ends_with(node.name(), "_tuple"); + ::arrow::util::string_view name{node.name()}; + return name == "array" || name.ends_with("_tuple"); } std::shared_ptr<::arrow::KeyValueMetadata> FieldIdMetadata(int field_id) { diff --git a/cpp/thirdparty/versions.txt b/cpp/thirdparty/versions.txt index 3bf8baadfe8b6..24da92a34b22f 100644 --- a/cpp/thirdparty/versions.txt +++ b/cpp/thirdparty/versions.txt @@ -58,7 +58,7 @@ ARROW_ZSTD_BUILD_VERSION=v1.4.3 # given version. DEPENDENCIES=( "ARROW_AWSSDK_URL aws-sdk-cpp-${ARROW_AWSSDK_BUILD_VERSION}.tar.gz https://github.com/aws/aws-sdk-cpp/archive/${ARROW_AWSSDK_BUILD_VERSION}.tar.gz" - "ARROW_BOOST_URL boost-${ARROW_BOOST_BUILD_VERSION}.tar.gz https://dl.bintray.com/boostorg/release/${ARROW_BOOST_BUILD_VERSION}/source/boost_${ARROW_BOOST_BUILD_VERSION//./_}.tar.gz" + "ARROW_BOOST_URL boost-${ARROW_BOOST_BUILD_VERSION}.tar.gz https://dl.bintray.com/ursalabs/arrow-boost/boost_${ARROW_BOOST_BUILD_VERSION//./_}.tar.gz" "ARROW_BROTLI_URL brotli-${ARROW_BROTLI_BUILD_VERSION}.tar.gz https://github.com/google/brotli/archive/${ARROW_BROTLI_BUILD_VERSION}.tar.gz" "ARROW_BZIP2_URL bzip2-${ARROW_BZIP2_BUILD_VERSION}.tar.gz https://sourceware.org/pub/bzip2/bzip2-${ARROW_BZIP2_BUILD_VERSION}.tar.gz" "ARROW_CARES_URL cares-${ARROW_CARES_BUILD_VERSION}.tar.gz https://c-ares.haxx.se/download/c-ares-${ARROW_CARES_BUILD_VERSION}.tar.gz" diff --git a/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb b/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb index fc0125f432389..6c875ee43c98e 100644 --- a/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb +++ b/dev/tasks/homebrew-formulae/autobrew/apache-arrow.rb @@ -31,7 +31,6 @@ class ApacheArrow < Formula # NOTE: if you add something here, be sure to add to PKG_LIBS in r/tools/autobrew depends_on "cmake" => :build - depends_on "boost" depends_on "lz4" depends_on "snappy" depends_on "thrift" @@ -76,7 +75,7 @@ def install return 0; } EOS - system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-larrow", "-lparquet", "-lthrift", "-llz4", "-lboost_system", "-lboost_regex", "-lsnappy", "-o", "test" + system ENV.cxx, "test.cpp", "-std=c++11", "-I#{include}", "-L#{lib}", "-larrow", "-lparquet", "-lthrift", "-llz4", "-lsnappy", "-o", "test" system "./test" end end diff --git a/r/configure.win b/r/configure.win index 61d3b2db97bbe..58d6445e1a15b 100644 --- a/r/configure.win +++ b/r/configure.win @@ -41,7 +41,7 @@ RWINLIB="../windows/$(ls windows/ | grep ^arrow-)" OPENSSL_LIBS="-lcrypto -lcrypt32" PKG_CFLAGS="-I${RWINLIB}/include -DARROW_STATIC -DPARQUET_STATIC -DARROW_DS_STATIC -DARROW_R_WITH_ARROW" -PKG_LIBS="-L${RWINLIB}/lib"'$(subst gcc,,$(COMPILED_BY))$(R_ARCH) '"-L${RWINLIB}/lib"'$(R_ARCH) '"-lparquet -larrow_dataset -larrow -lthrift -lsnappy -lboost_regex-mt-s -lboost_system-mt-s -lz -lzstd -llz4 ${OPENSSL_LIBS} -lws2_32" +PKG_LIBS="-L${RWINLIB}/lib"'$(subst gcc,,$(COMPILED_BY))$(R_ARCH) '"-L${RWINLIB}/lib"'$(R_ARCH) '"-lparquet -larrow_dataset -larrow -lthrift -lsnappy -lz -lzstd -llz4 ${OPENSSL_LIBS} -lws2_32" # Set any user-defined CXXFLAGS if [ "$ARROW_R_CXXFLAGS" ]; then