Skip to content

Apache DataFusion SQL Query Engine

ARROW-3075: [C++] Incorporate parquet-cpp codebase into Arrow C++ build system. Add unit test label granularity options, ability to add component group targets like 'make parquet' that build libraries and tests

Wes McKinneya32ba482de76
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000000..71722b2177
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "cpp/submodules/parquet-testing"]
+ path = cpp/submodules/parquet-testing
+ url = https://github.com/apache/parquet-testing.git
diff --git a/.travis.yml b/.travis.yml
index f77e22da56..d919baff6d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -60,6 +60,7 @@ matrix:
- ARROW_TRAVIS_ORC=1
- ARROW_TRAVIS_CLANG_FORMAT=1
- ARROW_TRAVIS_COVERAGE=1
+ - ARROW_TRAVIS_PARQUET=1
- ARROW_TRAVIS_PYTHON_DOCS=1
- ARROW_BUILD_WARNING_LEVEL=CHECKIN
- ARROW_TRAVIS_PYTHON_JVM=1
@@ -77,11 +78,11 @@ matrix:
- $TRAVIS_BUILD_DIR/ci/travis_install_clang_tools.sh
- $TRAVIS_BUILD_DIR/ci/travis_lint.sh
# If either C++ or Python changed, we must install the C++ libraries
+ - git submodule update --init
- $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh
script:
# All test steps are required for accurate C++ coverage info
- $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh
- - $TRAVIS_BUILD_DIR/ci/travis_build_parquet_cpp.sh
# Build Arrow Java to test the pyarrow<->JVM in-process bridge
- $TRAVIS_BUILD_DIR/ci/travis_script_java.sh
# Only run Plasma tests with valgrind in one of the Python builds because
@@ -102,14 +103,15 @@ matrix:
- ARROW_TRAVIS_USE_TOOLCHAIN=1
- ARROW_TRAVIS_PLASMA=1
- ARROW_TRAVIS_ORC=1
+ - ARROW_TRAVIS_PARQUET=1
- ARROW_BUILD_WARNING_LEVEL=CHECKIN
before_script:
- if [ $ARROW_CI_PYTHON_AFFECTED != "1" ]; then exit; fi
# If either C++ or Python changed, we must install the C++ libraries
+ - git submodule update --init
- $TRAVIS_BUILD_DIR/ci/travis_before_script_cpp.sh
script:
- if [ $ARROW_CI_CPP_AFFECTED == "1" ]; then $TRAVIS_BUILD_DIR/ci/travis_script_cpp.sh; fi
- - $TRAVIS_BUILD_DIR/ci/travis_build_parquet_cpp.sh
- $TRAVIS_BUILD_DIR/ci/travis_script_python.sh 2.7
- $TRAVIS_BUILD_DIR/ci/travis_script_python.sh 3.6
# [manylinux1] Python
diff --git a/appveyor.yml b/appveyor.yml
index e03bfdfc9d..1bbdf65bd2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -48,7 +48,6 @@ environment:
GENERATOR: Ninja
CONFIGURATION: "Release"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- BOOST_ROOT: C:\Libraries\boost_1_64_0
- JOB: "Toolchain"
GENERATOR: Visual Studio 14 2015 Win64
CONFIGURATION: "Release"
@@ -67,8 +66,8 @@ environment:
USE_CLCACHE: false
MSVC_DEFAULT_OPTIONS: ON
- BOOST_ROOT: C:\Libraries\boost_1_63_0
- BOOST_LIBRARYDIR: C:\Libraries\boost_1_63_0\lib64-msvc-14.0
+ BOOST_ROOT: C:\Libraries\boost_1_67_0
+ BOOST_LIBRARYDIR: C:\Libraries\boost_1_67_0\lib64-msvc-14.0
APPVEYOR_SAVE_CACHE_ON_ERROR: true
install:
diff --git a/ci/cpp-python-msvc-build.bat b/ci/cpp-python-msvc-build.bat
index a0f5fbe8b3..522843dccb 100644
--- a/ci/cpp-python-msvc-build.bat
+++ b/ci/cpp-python-msvc-build.bat
@@ -68,16 +68,20 @@ if "%JOB%" == "Build_Debug" (
exit /B 0
)
-conda create -n arrow -q -y python=%PYTHON% ^
+conda create -n arrow -q -y -c conda-forge ^
+ python=%PYTHON% ^
six pytest setuptools numpy pandas cython ^
- thrift-cpp=0.11.0
+ thrift-cpp=0.11.0 boost-cpp
call activate arrow
+@rem Use Boost from conda-forge
+set BOOST_ROOT=%CONDA_PREFIX%\Library
+set BOOST_LIBRARYDIR=%CONDA_PREFIX%\Library\lib
+
if "%JOB%" == "Toolchain" (
@rem Install pre-built "toolchain" packages for faster builds
conda install -q -y -c conda-forge ^
- boost-cpp ^
brotli ^
cmake ^
flatbuffers ^
@@ -94,6 +98,10 @@ if "%JOB%" == "Toolchain" (
set ARROW_HOME=%CONDA_PREFIX%\Library
+@rem Retrieve git submodules, configure env var for Parquet unit tests
+git submodule update --init
+set PARQUET_TEST_DATA=%CD%\cpp\submodules\parquet-testing\data
+
@rem Build and test Arrow C++ libraries
mkdir cpp\build
@@ -104,6 +112,7 @@ cmake -G "%GENERATOR%" ^
-DARROW_BOOST_USE_SHARED=OFF ^
-DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
-DARROW_CXXFLAGS="/WX /MP" ^
+ -DARROW_PARQUET=ON ^
-DARROW_PYTHON=ON ^
.. || exit /B
cmake --build . --target install --config %CONFIGURATION% || exit /B
@@ -117,26 +126,7 @@ ctest -VV || exit /B
set PYTHONHOME=%OLD_PYTHONHOME%
popd
-@rem Build parquet-cpp
-
-git clone https://github.com/apache/parquet-cpp.git || exit /B
-mkdir parquet-cpp\build
-pushd parquet-cpp\build
-
-set PARQUET_BUILD_TOOLCHAIN=%CONDA_PREFIX%\Library
-set PARQUET_HOME=%CONDA_PREFIX%\Library
-cmake -G "%GENERATOR%" ^
- -DCMAKE_INSTALL_PREFIX=%PARQUET_HOME% ^
- -DCMAKE_BUILD_TYPE=%CONFIGURATION% ^
- -DPARQUET_BOOST_USE_SHARED=OFF ^
- -DPARQUET_BUILD_TESTS=OFF ^
- .. || exit /B
-cmake --build . --target install --config %CONFIGURATION% || exit /B
-popd
-
@rem Build and install pyarrow
-@rem parquet-cpp has some additional runtime dependencies that we need to figure out
-@rem see PARQUET-1018
pushd python
@@ -149,6 +139,9 @@ set PYARROW_BUNDLE_BOOST=OFF
set PYARROW_WITH_STATIC_BOOST=ON
set PYARROW_WITH_PARQUET=ON
+@rem ARROW-3075; pkgconfig is broken for Parquet for now
+set PARQUET_HOME=%CONDA_PREFIX%\Library
+
python setup.py build_ext ^
install -q --single-version-externally-managed --record=record.text ^
bdist_wheel -q || exit /B
diff --git a/ci/travis_before_script_cpp.sh b/ci/travis_before_script_cpp.sh
index 541d5fd937..e1c231ce4d 100755
--- a/ci/travis_before_script_cpp.sh
+++ b/ci/travis_before_script_cpp.sh
@@ -82,6 +82,10 @@ if [ $ARROW_TRAVIS_ORC == "1" ]; then
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_ORC=ON"
fi
+if [ $ARROW_TRAVIS_PARQUET == "1" ]; then
+ CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_PARQUET=ON"
+fi
+
if [ $ARROW_TRAVIS_VALGRIND == "1" ]; then
CMAKE_COMMON_FLAGS="$CMAKE_COMMON_FLAGS -DARROW_TEST_MEMCHECK=ON"
fi
diff --git a/ci/travis_build_parquet_cpp.sh b/ci/travis_build_parquet_cpp.sh
deleted file mode 100755
index f64a85d621..0000000000
--- a/ci/travis_build_parquet_cpp.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env 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.
-
-set -e
-
-source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh
-
-source $TRAVIS_BUILD_DIR/ci/travis_install_toolchain.sh
-
-export PARQUET_BUILD_TOOLCHAIN=$CPP_TOOLCHAIN
-export ARROW_HOME=$ARROW_CPP_INSTALL
-
-PARQUET_DIR=$TRAVIS_BUILD_DIR/parquet
-mkdir -p $PARQUET_DIR
-
-git clone -q https://github.com/apache/parquet-cpp.git $PARQUET_DIR
-
-pushd $PARQUET_DIR
-mkdir build-dir
-cd build-dir
-
-cmake \
- -GNinja \
- -DCMAKE_BUILD_TYPE=debug \
- -DCMAKE_INSTALL_PREFIX=$ARROW_PYTHON_PARQUET_HOME \
- -DPARQUET_BOOST_USE_SHARED=on \
- -DPARQUET_BUILD_BENCHMARKS=off \
- -DPARQUET_BUILD_EXECUTABLES=off \
- -DPARQUET_BUILD_TESTS=off \
- ..
-
-ninja
-ninja install
-
-popd
diff --git a/ci/travis_env_common.sh b/ci/travis_env_common.sh
index 622a7959f4..009dff19ec 100755
--- a/ci/travis_env_common.sh
+++ b/ci/travis_env_common.sh
@@ -44,8 +44,6 @@ export ARROW_CPP_BUILD_DIR=$TRAVIS_BUILD_DIR/cpp-build
export ARROW_C_GLIB_INSTALL_AUTOTOOLS=$TRAVIS_BUILD_DIR/c-glib-install-autotools
export ARROW_C_GLIB_INSTALL_MESON=$TRAVIS_BUILD_DIR/c-glib-install-meson
-export ARROW_PYTHON_PARQUET_HOME=$TRAVIS_BUILD_DIR/parquet-env
-
export CMAKE_EXPORT_COMPILE_COMMANDS=1
export ARROW_BUILD_TYPE=${ARROW_BUILD_TYPE:=debug}
@@ -70,3 +68,5 @@ fi
if [ $TRAVIS_OS_NAME == "osx" ]; then
export GOPATH=$TRAVIS_BUILD_DIR/gopath
fi
+
+export PARQUET_TEST_DATA=$TRAVIS_BUILD_DIR/cpp/submodules/parquet-testing/data
diff --git a/ci/travis_install_toolchain.sh b/ci/travis_install_toolchain.sh
index 924f75214f..f6b5cf88c7 100755
--- a/ci/travis_install_toolchain.sh
+++ b/ci/travis_install_toolchain.sh
@@ -40,8 +40,4 @@ if [ ! -e $CPP_TOOLCHAIN ]; then
thrift-cpp=0.11.0 \
zlib \
zstd
-
- # HACK(wesm): We started experiencing OpenSSL failures when Miniconda was
- # updated sometime on October 2 or October 3
-# conda update -y -q -p $CPP_TOOLCHAIN ca-certificates -c defaults
fi
diff --git a/ci/travis_script_python.sh b/ci/travis_script_python.sh
index 1f774dad5a..e12a37391c 100755
--- a/ci/travis_script_python.sh
+++ b/ci/travis_script_python.sh
@@ -23,8 +23,8 @@ source $TRAVIS_BUILD_DIR/ci/travis_env_common.sh
source $TRAVIS_BUILD_DIR/ci/travis_install_conda.sh
export ARROW_HOME=$ARROW_CPP_INSTALL
-export PARQUET_HOME=$ARROW_PYTHON_PARQUET_HOME
-export LD_LIBRARY_PATH=$ARROW_HOME/lib:$PARQUET_HOME/lib:$LD_LIBRARY_PATH
+export PARQUET_HOME=$ARROW_CPP_INSTALL
+export LD_LIBRARY_PATH=$ARROW_HOME/lib:$LD_LIBRARY_PATH
export PYARROW_CXXFLAGS="-Werror"
PYARROW_PYTEST_FLAGS=" -r sxX --durations=15 --parquet"
diff --git a/dev/release/rat_exclude_files.txt b/dev/release/rat_exclude_files.txt
index 0f358ac6c4..47f8d84054 100644
--- a/dev/release/rat_exclude_files.txt
+++ b/dev/release/rat_exclude_files.txt
@@ -1,5 +1,6 @@
*.npmrc
*.gitignore
+.gitmodules
*_generated.h
*_generated.js
*_generated.ts
@@ -27,6 +28,7 @@ cpp/cmake_modules/SetupCxxFlags.cmake
cpp/cmake_modules/SnappyCMakeLists.txt
cpp/cmake_modules/SnappyConfig.h
cpp/cmake_modules/CompilerInfo.cmake
+cpp/src/parquet/.parquetcppversion
cpp/src/plasma/thirdparty/ae/ae.c
cpp/src/plasma/thirdparty/ae/ae.h
cpp/src/plasma/thirdparty/ae/ae_epoll.c