Skip to content

Commit c8a4cc3

Browse files
authored
Revert "Rebase"
This reverts commit c54ba7c.
1 parent c54ba7c commit c8a4cc3

111 files changed

Lines changed: 710 additions & 2043 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ R_ORG=rhub
8484
R_TAG=latest
8585

8686
# Env vars for R builds
87+
R_UPDATE_CLANG=false
8788
R_CUSTOM_CCACHE=false
8889
ARROW_R_DEV=TRUE
8990
R_PRUNE_DEPS=FALSE

.github/workflows/cpp_extra.yml

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -107,16 +107,6 @@ jobs:
107107
- image: alpine-linux-cpp
108108
runs-on: ubuntu-latest
109109
title: AMD64 Alpine Linux
110-
- image: ubuntu-cpp
111-
run-options: >-
112-
-e ARROW_CTEST_TIMEOUT=2000
113-
-e ARROW_C_FLAGS_DEBUG="-O1"
114-
-e ARROW_CXX_FLAGS_DEBUG="-O1"
115-
-e ARROW_GANDIVA=OFF
116-
-e ARROW_LARGE_MEMORY_TESTS=ON
117-
-e BUILD_WARNING_LEVEL=PRODUCTION
118-
runs-on: "runs-on=${{ github.run_id }}/family=x8i.2xlarge/volume=80gb/spot=capacity-optimized"
119-
title: AMD64 Ubuntu Large Memory Tests
120110
- image: conda-cpp
121111
run-options: >-
122112
-e ARROW_USE_MESON=ON
@@ -346,62 +336,6 @@ jobs:
346336
cd cpp/examples/minimal_build
347337
../minimal_build.build/arrow-example
348338
349-
odbc-linux:
350-
needs: check-labels
351-
name: ODBC Linux
352-
runs-on: ubuntu-latest
353-
if: >-
354-
needs.check-labels.outputs.force == 'true' ||
355-
contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
356-
contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
357-
timeout-minutes: 75
358-
strategy:
359-
fail-fast: false
360-
env:
361-
ARCH: amd64
362-
ARCHERY_DEBUG: 1
363-
ARROW_ENABLE_TIMING_TESTS: OFF
364-
DOCKER_VOLUME_PREFIX: ".docker/"
365-
UBUNTU: 24.04
366-
steps:
367-
- name: Checkout Arrow
368-
uses: actions/checkout@v6
369-
with:
370-
fetch-depth: 0
371-
submodules: recursive
372-
- name: Cache Docker Volumes
373-
uses: actions/cache@v5
374-
with:
375-
path: .docker
376-
key: ubuntu-cpp-odbc-${{ hashFiles('cpp/**') }}
377-
restore-keys: ubuntu-cpp-odbc-
378-
- name: Setup Python on hosted runner
379-
uses: actions/setup-python@v6
380-
with:
381-
python-version: 3
382-
- name: Setup Archery
383-
run: python3 -m pip install -e dev/archery[docker]
384-
- name: Execute Docker Build
385-
env:
386-
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
387-
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
388-
run: |
389-
# GH-40558: reduce ASLR to avoid ASAN/LSAN crashes
390-
sudo sysctl -w vm.mmap_rnd_bits=28
391-
source ci/scripts/util_enable_core_dumps.sh
392-
archery docker run ubuntu-cpp-odbc
393-
- name: Docker Push
394-
if: >-
395-
success() &&
396-
github.event_name == 'push' &&
397-
github.repository == 'apache/arrow' &&
398-
github.ref_name == 'main'
399-
env:
400-
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
401-
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
402-
continue-on-error: true
403-
run: archery docker push ubuntu-cpp-odbc
404-
405339
odbc-macos:
406340
needs: check-labels
407341
name: ODBC ${{ matrix.build-type }} ${{ matrix.architecture }} macOS ${{ matrix.macos-version }}
@@ -501,7 +435,7 @@ jobs:
501435
"$(pwd)/build/cpp/${{ matrix.build-type }}/libarrow_flight_sql_odbc.dylib"
502436
- name: Register Flight SQL ODBC Driver
503437
run: |
504-
sudo cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh $(pwd)/build/cpp/${{ matrix.build-type }}/libarrow_flight_sql_odbc.dylib
438+
sudo cpp/src/arrow/flight/sql/odbc/install/mac/install_odbc.sh $(pwd)/build/cpp/${{ matrix.build-type }}/libarrow_flight_sql_odbc.dylib
505439
- name: Test
506440
shell: bash
507441
run: |
@@ -764,7 +698,6 @@ jobs:
764698
- jni-linux
765699
- jni-macos
766700
- msvc-arm64
767-
- odbc-linux
768701
- odbc-macos
769702
- odbc-msvc
770703
- odbc-nightly

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ repos:
353353
?^cpp/build-support/update-thrift\.sh$|
354354
?^cpp/examples/minimal_build/run\.sh$|
355355
?^cpp/examples/tutorial_examples/run\.sh$|
356-
?^cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc\.sh$|
356+
?^cpp/src/arrow/flight/sql/odbc/install/mac/install_odbc\.sh$|
357357
?^dev/release/05-binary-upload\.sh$|
358358
?^dev/release/08-binary-verify\.sh$|
359359
?^dev/release/binary-recover\.sh$|

ci/docker/linux-r.dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ ENV R_PRUNE_DEPS=${r_prune_deps}
3333
ARG r_custom_ccache=false
3434
ENV R_CUSTOM_CCACHE=${r_custom_ccache}
3535

36+
ARG r_update_clang=false
37+
ENV R_UPDATE_CLANG=${r_update_clang}
38+
3639
ARG tz="UTC"
3740
ENV TZ=${tz}
3841

ci/docker/ubuntu-24.04-cpp.dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ RUN apt-get update -y -q && \
121121
rsync \
122122
tzdata \
123123
tzdata-legacy \
124-
unixodbc-dev \
125124
uuid-runtime \
126125
unzip \
127126
wget && \

ci/scripts/r_docker_configure.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ else
8585
$PACKAGE_MANAGER install -y rsync cmake curl
8686
fi
8787

88+
# Update clang version to latest available.
89+
# This is only for rhub/clang20. If we change the base image from rhub/clang20,
90+
# we need to update this part too.
91+
if [ "$R_UPDATE_CLANG" = true ]; then
92+
apt update -y --allow-releaseinfo-change # flag needed for when debian version changes
93+
apt install -y gnupg
94+
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor -o /etc/apt/trusted.gpg.d/llvm.gpg
95+
echo "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-20 main" > /etc/apt/sources.list.d/llvm20.list
96+
apt update -y --allow-releaseinfo-change # flag needed for when debian version changes
97+
apt install -y clang-20 lld-20
98+
fi
8899

89100
# Workaround for html help install failure; see https://github.com/r-lib/devtools/issues/2084#issuecomment-530912786
90101
Rscript -e 'x <- file.path(R.home("doc"), "html"); if (!file.exists(x)) {dir.create(x, recursive=TRUE); file.copy(system.file("html/R.css", package="stats"), x)}'

ci/scripts/r_install_system_dependencies.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,17 @@ else
3535
apt-get update
3636
fi
3737

38-
# Install curl, OpenSSL, and libuv
39-
# - curl/OpenSSL: technically only needed for S3/GCS support, but
40-
# installing the R curl package fails without it
41-
# - libuv: required by the fs R package (no longer bundles libuv by default)
38+
# Install curl and OpenSSL (technically, only needed for S3/GCS support, but
39+
# installing the R curl package fails without it)
4240
case "$PACKAGE_MANAGER" in
4341
apt-get)
44-
apt-get install -y libcurl4-openssl-dev libssl-dev libuv1-dev
42+
apt-get install -y libcurl4-openssl-dev libssl-dev
4543
;;
4644
apk)
47-
$PACKAGE_MANAGER add curl-dev openssl-dev libuv-dev
45+
$PACKAGE_MANAGER add curl-dev openssl-dev
4846
;;
4947
*)
50-
$PACKAGE_MANAGER install -y libcurl-devel openssl-devel libuv-devel
48+
$PACKAGE_MANAGER install -y libcurl-devel openssl-devel
5149
;;
5250
esac
5351

ci/scripts/r_revdepcheck.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ apt install -y \
3636
libbz2-dev \
3737
libc-ares-dev \
3838
libcurl4-openssl-dev \
39-
libuv1-dev \
4039
libgflags-dev \
4140
libgoogle-glog-dev \
4241
liblz4-dev \

compose.yaml

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ x-hierarchy:
151151
- ubuntu-r-only-r
152152
- ubuntu-cpp-bundled
153153
- ubuntu-cpp-bundled-offline
154-
- ubuntu-cpp-odbc
155154
- ubuntu-cpp-minimal
156155
- ubuntu-cuda-cpp:
157156
- ubuntu-cuda-python
@@ -372,7 +371,7 @@ services:
372371
/arrow/ci/scripts/cpp_build.sh /arrow /build &&
373372
/arrow/ci/scripts/cpp_test.sh /arrow /build"
374373

375-
ubuntu-cpp: &ubuntu-cpp-base
374+
ubuntu-cpp:
376375
# Usage:
377376
# docker compose build ubuntu-cpp
378377
# docker compose run --rm ubuntu-cpp
@@ -497,33 +496,6 @@ services:
497496
volumes: *ubuntu-volumes
498497
command: *cpp-command
499498

500-
ubuntu-cpp-odbc:
501-
# Arrow Flight SQL ODBC build with BUNDLED dependencies with downloaded dependencies.
502-
<<: *ubuntu-cpp-base
503-
environment:
504-
<<: [*common, *ccache, *sccache, *cpp]
505-
ARROW_ACERO: "OFF"
506-
ARROW_AZURE: "OFF"
507-
ARROW_BUILD_TYPE: RELEASE
508-
ARROW_CSV: "OFF"
509-
ARROW_DATASET: "OFF"
510-
ARROW_DEPENDENCY_SOURCE: BUNDLED
511-
ARROW_DEPENDENCY_USE_SHARED: "OFF"
512-
ARROW_FLIGHT_SQL_ODBC: "ON"
513-
ARROW_GANDIVA: "OFF"
514-
ARROW_GCS: "OFF"
515-
ARROW_HDFS: "OFF"
516-
ARROW_ORC: "OFF"
517-
ARROW_PARQUET: "OFF"
518-
ARROW_S3: "OFF"
519-
ARROW_SUBSTRAIT: "OFF"
520-
# Register ODBC before running tests
521-
command: >
522-
/bin/bash -c "
523-
/arrow/ci/scripts/cpp_build.sh /arrow /build &&
524-
sudo /arrow/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh /usr/local/lib/libarrow_flight_sql_odbc.so &&
525-
/arrow/ci/scripts/cpp_test.sh /arrow /build"
526-
527499
ubuntu-cpp-minimal:
528500
# Arrow build with minimal components/dependencies
529501
image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-cpp-minimal
@@ -1695,6 +1667,7 @@ services:
16951667
tz: ${TZ}
16961668
r_prune_deps: ${R_PRUNE_DEPS}
16971669
r_custom_ccache: ${R_CUSTOM_CCACHE}
1670+
r_update_clang: ${R_UPDATE_CLANG}
16981671
shm_size: *shm-size
16991672
environment:
17001673
<<: [*common, *sccache]

cpp/CMakeLists.txt

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,17 @@ else()
211211
set(MSVC_TOOLCHAIN FALSE)
212212
endif()
213213

214+
find_package(ClangTools)
215+
find_package(InferTools)
216+
if("$ENV{CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "1"
217+
OR CLANG_TIDY_FOUND
218+
OR INFER_FOUND)
219+
# Generate a Clang compile_commands.json "compilation database" file for use
220+
# with various development tools, such as Vim's YouCompleteMe plugin.
221+
# See http://clang.llvm.org/docs/JSONCompilationDatabase.html
222+
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
223+
endif()
224+
214225
# Needed for Gandiva.
215226
# Use the first Python installation on PATH, not the newest one
216227
set(Python3_FIND_STRATEGY "LOCATION")
@@ -638,6 +649,22 @@ if(UNIX)
638649
VERBATIM)
639650
endif(UNIX)
640651
652+
#
653+
# "make infer" target
654+
#
655+
656+
if(${INFER_FOUND})
657+
# runs infer capture
658+
add_custom_target(infer ${BUILD_SUPPORT_DIR}/run-infer.sh ${INFER_BIN}
659+
${CMAKE_BINARY_DIR}/compile_commands.json 1)
660+
# runs infer analyze
661+
add_custom_target(infer-analyze ${BUILD_SUPPORT_DIR}/run-infer.sh ${INFER_BIN}
662+
${CMAKE_BINARY_DIR}/compile_commands.json 2)
663+
# runs infer report
664+
add_custom_target(infer-report ${BUILD_SUPPORT_DIR}/run-infer.sh ${INFER_BIN}
665+
${CMAKE_BINARY_DIR}/compile_commands.json 3)
666+
endif()
667+
641668
#
642669
# Link targets
643670
#

0 commit comments

Comments
 (0)