Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into cmakelint
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Feb 21, 2021
2 parents f79b8c5 + 5fc0e5e commit 6b28115
Show file tree
Hide file tree
Showing 220 changed files with 14,212 additions and 8,439 deletions.
6 changes: 6 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
# the cache plugin functional
DOCKER_VOLUME_PREFIX=

# turn on inline build cache, this is a docker buildx feature documented
# at https://github.com/docker/buildx#--cache-tonametypetypekeyvalue
COMPOSE_DOCKER_CLI_BUILD=1
DOCKER_BUILDKIT=1
BUILDKIT_INLINE_CACHE=1

ULIMIT_CORE=-1
REPO=apache/arrow-dev
ARCH=amd64
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@ on:
- 'format/Flight.proto'

env:
DOCKER_BUILDKIT: 0
DOCKER_VOLUME_PREFIX: ".docker/"
COMPOSE_DOCKER_CLI_BUILD: 1
ARROW_ENABLE_TIMING_TESTS: OFF
DOCKER_VOLUME_PREFIX: ".docker/"
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down Expand Up @@ -72,7 +70,7 @@ jobs:
- name: Free Up Disk Space
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: ${{ matrix.image }}-${{ hashFiles('cpp/**') }}
Expand Down Expand Up @@ -367,7 +365,7 @@ jobs:
run: |
ci/scripts/msys2_setup.sh cpp
- name: Cache ccache
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: ccache
key: cpp-ccache-mingw${{ matrix.mingw-n-bits }}-${{ hashFiles('cpp/**') }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/cpp_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@ on:
0 */12 * * *
env:
DOCKER_BUILDKIT: 0
DOCKER_VOLUME_PREFIX: ".docker/"
COMPOSE_DOCKER_CLI_BUILD: 1
ARROW_ENABLE_TIMING_TESTS: OFF
DOCKER_VOLUME_PREFIX: ".docker/"
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down Expand Up @@ -83,7 +81,7 @@ jobs:
- name: Free Up Disk Space
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: ${{ matrix.name }}-${{ hashFiles('cpp/**') }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ on:
pull_request:

env:
DOCKER_BUILDKIT: 0
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ on:
- 'go/**'

env:
DOCKER_BUILDKIT: 0
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ on:
- 'rust/**'

env:
DOCKER_BUILDKIT: 0
DOCKER_VOLUME_PREFIX: ".docker/"
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand All @@ -66,7 +64,7 @@ jobs:
- name: Free Up Disk Space
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: conda-${{ hashFiles('cpp/**') }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ on:
- 'java/**'

env:
DOCKER_BUILDKIT: 0
DOCKER_VOLUME_PREFIX: ".docker/"
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down Expand Up @@ -68,7 +66,7 @@ jobs:
shell: bash
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: maven-${{ hashFiles('java/**') }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/java_jni.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@ on:
- 'java/**'

env:
DOCKER_BUILDKIT: 0
DOCKER_VOLUME_PREFIX: ".docker/"
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down Expand Up @@ -66,7 +64,7 @@ jobs:
- name: Free Up Disk Space
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: maven-${{ hashFiles('java/**') }}
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ on:
- 'js/**'

env:
DOCKER_BUILDKIT: 0
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ on:
- 'python/**'

env:
DOCKER_BUILDKIT: 0
DOCKER_VOLUME_PREFIX: ".docker/"
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down Expand Up @@ -84,7 +82,7 @@ jobs:
- name: Free Up Disk Space
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: ${{ matrix.cache }}-${{ hashFiles('cpp/**') }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/python_cron.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ on:
0 */12 * * *
env:
DOCKER_BUILDKIT: 0
DOCKER_VOLUME_PREFIX: ".docker/"
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down Expand Up @@ -121,7 +119,7 @@ jobs:
- name: Free Up Disk Space
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: ${{ matrix.cache }}-${{ hashFiles('cpp/**') }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@ on:
- 'r/**'

env:
DOCKER_BUILDKIT: 0
DOCKER_VOLUME_PREFIX: ".docker/"
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand All @@ -69,7 +67,7 @@ jobs:
- name: Free Up Disk Space
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: ubuntu-${{ matrix.ubuntu }}-r-${{ matrix.r }}-${{ hashFiles('cpp/**') }}
Expand Down Expand Up @@ -117,7 +115,7 @@ jobs:
- name: Free Up Disk Space
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: ${{ matrix.config.image }}-r-${{ hashFiles('cpp/**') }}
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ on:
- 'ruby/**'

env:
DOCKER_BUILDKIT: 0
DOCKER_VOLUME_PREFIX: ".docker/"
COMPOSE_DOCKER_CLI_BUILD: 1
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}

Expand Down Expand Up @@ -76,7 +74,7 @@ jobs:
shell: bash
run: ci/scripts/util_cleanup.sh
- name: Cache Docker Volumes
uses: actions/cache@v1
uses: actions/cache@v2
with:
path: .docker
key: ubuntu-${{ matrix.ubuntu }}-ruby-${{ hashFiles('cpp/**') }}
Expand Down
1 change: 1 addition & 0 deletions c_glib/arrow-glib/reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,7 @@ garrow_csv_reader_new(GArrowInputStream *input,

auto arrow_reader =
arrow::csv::TableReader::Make(arrow::default_memory_pool(),
arrow::io::AsyncContext(),
arrow_input,
read_options,
parse_options,
Expand Down
3 changes: 2 additions & 1 deletion ci/docker/python-wheel-manylinux-201x.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ ARG build_type=release
ENV CMAKE_BUILD_TYPE=${build_type} \
VCPKG_FORCE_SYSTEM_BINARIES=1 \
VCPKG_OVERLAY_TRIPLETS=/arrow/ci/vcpkg \
VCPKG_DEFAULT_TRIPLET=x64-linux-static-${build_type}
VCPKG_DEFAULT_TRIPLET=x64-linux-static-${build_type} \
VCPKG_FEATURE_FLAGS=-manifests

# TODO(kszucs): factor out the package enumeration to a text file and reuse it
# from the windows image and potentially in a future macos wheel build
Expand Down
3 changes: 2 additions & 1 deletion ci/docker/python-wheel-windows-vs2017.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ COPY ci/vcpkg arrow/ci/vcpkg
ARG build_type=release
ENV CMAKE_BUILD_TYPE=${build_type} \
VCPKG_OVERLAY_TRIPLETS=C:\\arrow\\ci\\vcpkg \
VCPKG_DEFAULT_TRIPLET=x64-windows-static-md-${build_type}
VCPKG_DEFAULT_TRIPLET=x64-windows-static-md-${build_type} \
VCPKG_FEATURE_FLAGS=-manifests
RUN vcpkg install --clean-after-build \
abseil \
aws-sdk-cpp[config,cognito-identity,core,identity-management,s3,sts,transfer] \
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ arch=("any")
url="https://arrow.apache.org/"
license=("Apache-2.0")
depends=("${MINGW_PACKAGE_PREFIX}-aws-sdk-cpp"
"${MINGW_PACKAGE_PREFIX}-libutf8proc"
"${MINGW_PACKAGE_PREFIX}-re2"
"${MINGW_PACKAGE_PREFIX}-thrift"
"${MINGW_PACKAGE_PREFIX}-snappy"
"${MINGW_PACKAGE_PREFIX}-zlib"
Expand Down Expand Up @@ -103,9 +105,7 @@ build() {
-DARROW_SNAPPY_USE_SHARED=OFF \
-DARROW_USE_GLOG=OFF \
-DARROW_WITH_LZ4=ON \
-DARROW_WITH_RE2=OFF \
-DARROW_WITH_SNAPPY=ON \
-DARROW_WITH_UTF8PROC=OFF \
-DARROW_WITH_ZLIB=ON \
-DARROW_WITH_ZSTD=ON \
-DARROW_ZSTD_USE_SHARED=OFF \
Expand Down
1 change: 1 addition & 0 deletions ci/scripts/cpp_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ if [ "${ARROW_FUZZING}" == "ON" ]; then
${binary_output_dir}/arrow-ipc-stream-fuzz ${ARROW_TEST_DATA}/arrow-ipc-stream/crash-*
${binary_output_dir}/arrow-ipc-stream-fuzz ${ARROW_TEST_DATA}/arrow-ipc-stream/*-testcase-*
${binary_output_dir}/arrow-ipc-file-fuzz ${ARROW_TEST_DATA}/arrow-ipc-file/*-testcase-*
${binary_output_dir}/arrow-ipc-tensor-stream-fuzz ${ARROW_TEST_DATA}/arrow-ipc-tensor-stream/*-testcase-*
if [ "${ARROW_PARQUET}" == "ON" ]; then
${binary_output_dir}/parquet-arrow-fuzz ${ARROW_TEST_DATA}/parquet/fuzzing/*-testcase-*
fi
Expand Down
2 changes: 2 additions & 0 deletions ci/scripts/integration_arrow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ pip install -e $arrow_dir/dev/archery
archery integration --with-all --run-flight \
--gold-dirs=$gold_dir/0.14.1 \
--gold-dirs=$gold_dir/0.17.1 \
--gold-dirs=$gold_dir/1.0.0-bigendian \
--gold-dirs=$gold_dir/1.0.0-littleendian \
--gold-dirs=$gold_dir/2.0.0-compression \
3 changes: 3 additions & 0 deletions ci/scripts/python_wheel_manylinux_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ echo "=== (${PYTHON_VERSION}) Building Arrow C++ libraries ==="
: ${ARROW_WITH_ZSTD:=ON}
: ${CMAKE_BUILD_TYPE:=release}
: ${CMAKE_GENERATOR:=Ninja}
: ${VCPKG_FEATURE_FLAGS:=-manifests}

mkdir /tmp/arrow-build
pushd /tmp/arrow-build
Expand Down Expand Up @@ -106,6 +107,8 @@ cmake \
-DCMAKE_UNITY_BUILD=ON \
-DOPENSSL_USE_STATIC_LIBS=ON \
-DThrift_ROOT=/opt/vcpkg/installed/x64-linux/lib \
-D_VCPKG_INSTALLED_DIR=/opt/vcpkg/installed \
-DVCPKG_MANIFEST_MODE=OFF \
-DVCPKG_TARGET_TRIPLET=x64-linux-static-${CMAKE_BUILD_TYPE} \
-G ${CMAKE_GENERATOR} \
/arrow/cpp
Expand Down
3 changes: 3 additions & 0 deletions ci/scripts/python_wheel_windows_build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ set ARROW_WITH_ZLIB=ON
set ARROW_WITH_ZSTD=ON
set CMAKE_UNITY_BUILD=ON
set CMAKE_GENERATOR=Visual Studio 15 2017 Win64
set VCPKG_FEATURE_FLAGS=-manifests

mkdir C:\arrow-build
pushd C:\arrow-build
Expand Down Expand Up @@ -83,6 +84,8 @@ cmake ^
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake ^
-DCMAKE_UNITY_BUILD=%CMAKE_UNITY_BUILD% ^
-DMSVC_LINK_VERBOSE=ON ^
-D_VCPKG_INSTALLED_DIR=C:\vcpkg\installed ^
-DVCPKG_MANIFEST_MODE=OFF ^
-DVCPKG_TARGET_TRIPLET=x64-windows-static-md-%CMAKE_BUILD_TYPE% ^
-G "%CMAKE_GENERATOR%" ^
C:\arrow\cpp || exit /B
Expand Down
4 changes: 2 additions & 2 deletions ci/scripts/r_windows_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ cp $MSYS_LIB_DIR/mingw64/lib/lib{thrift,snappy}.a $DST_DIR/${RWINLIB_LIB_DIR}/x6
cp $MSYS_LIB_DIR/mingw32/lib/lib{thrift,snappy}.a $DST_DIR/${RWINLIB_LIB_DIR}/i386

# These are from https://dl.bintray.com/rtools/mingw{32,64}/
cp $MSYS_LIB_DIR/mingw64/lib/lib{zstd,lz4,crypto,aws*}.a $DST_DIR/lib/x64
cp $MSYS_LIB_DIR/mingw32/lib/lib{zstd,lz4,crypto,aws*}.a $DST_DIR/lib/i386
cp $MSYS_LIB_DIR/mingw64/lib/lib{zstd,lz4,crypto,utf8proc,re2,aws*}.a $DST_DIR/lib/x64
cp $MSYS_LIB_DIR/mingw32/lib/lib{zstd,lz4,crypto,utf8proc,re2,aws*}.a $DST_DIR/lib/i386

# Create build artifact
zip -r ${DST_DIR}.zip $DST_DIR
Expand Down
21 changes: 21 additions & 0 deletions cpp/CMakeSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"configurations": [
{
"name": "x64-Debug (default)",
"generator": "Ninja",
"configurationType": "Debug",
"inheritEnvironments": [ "msvc_x64_x64" ],
"buildRoot": "${projectDir}\\out\\build\\${name}",
"installRoot": "${projectDir}\\out\\install\\${name}",
"cmakeCommandArgs": "",
"buildCommandArgs": "",
"ctestCommandArgs": "",
"variables": [
{
"name":"VCPKG_MANIFEST_MODE",
"value":"OFF"
}
]
}
]
}
1 change: 1 addition & 0 deletions cpp/examples/minimal_build/example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ Status RunMain(int argc, char** argv) {
ARROW_ASSIGN_OR_RAISE(
auto csv_reader,
arrow::csv::TableReader::Make(arrow::default_memory_pool(),
arrow::io::AsyncContext(),
input_file,
arrow::csv::ReadOptions::Defaults(),
arrow::csv::ParseOptions::Defaults(),
Expand Down
1 change: 0 additions & 1 deletion cpp/src/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ set(ARROW_SRCS
util/future.cc
util/int_util.cc
util/io_util.cc
util/iterator.cc
util/logging.cc
util/key_value_metadata.cc
util/memory.cc
Expand Down
4 changes: 2 additions & 2 deletions cpp/src/arrow/array/array_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class ARROW_EXPORT Array {
///
/// Note that for `null_count == 0` or for null type, this will be null.
/// This buffer does not account for any slice offset
std::shared_ptr<Buffer> null_bitmap() const { return data_->buffers[0]; }
const std::shared_ptr<Buffer>& null_bitmap() const { return data_->buffers[0]; }

/// Raw pointer to the null bitmap.
///
Expand Down Expand Up @@ -160,7 +160,7 @@ class ARROW_EXPORT Array {
/// Input-checking variant of Array::Slice
Result<std::shared_ptr<Array>> SliceSafe(int64_t offset) const;

std::shared_ptr<ArrayData> data() const { return data_; }
const std::shared_ptr<ArrayData>& data() const { return data_; }

int num_fields() const { return static_cast<int>(data_->child_data.size()); }

Expand Down
Loading

0 comments on commit 6b28115

Please sign in to comment.