Skip to content

Commit a6aa449

Browse files
committed
Merge branch 'main' into add_tensor_document
2 parents a3d23b2 + 8b83784 commit a6aa449

87 files changed

Lines changed: 1392 additions & 251 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.

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ If this is your first pull request you can find detailed information on how to c
44

55
* [New Contributor's Guide](https://arrow.apache.org/docs/dev/developers/guide/step_by_step/pr_lifecycle.html#reviews-and-merge-of-the-pull-request)
66
* [Contributing Overview](https://arrow.apache.org/docs/dev/developers/overview.html)
7+
* [AI-generated Code Guidance](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code)
78

89
Please remove this line and the above text before creating your pull request.
910

.github/workflows/cpp_extra.yml

Lines changed: 163 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -336,9 +336,76 @@ jobs:
336336
cd cpp/examples/minimal_build
337337
../minimal_build.build/arrow-example
338338
339-
odbc:
339+
odbc-macos:
340340
needs: check-labels
341-
name: ODBC
341+
name: ODBC ${{ matrix.architecture }} macOS ${{ matrix.macos-version }}
342+
runs-on: macos-${{ matrix.macos-version }}
343+
if: >-
344+
needs.check-labels.outputs.force == 'true' ||
345+
contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
346+
contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
347+
timeout-minutes: 75
348+
strategy:
349+
fail-fast: false
350+
matrix:
351+
include:
352+
- architecture: AMD64
353+
macos-version: "15-intel"
354+
- architecture: ARM64
355+
macos-version: "14"
356+
env:
357+
ARROW_BUILD_TESTS: ON
358+
ARROW_FLIGHT_SQL_ODBC: ON
359+
ARROW_HOME: /tmp/local
360+
steps:
361+
- name: Checkout Arrow
362+
uses: actions/checkout@v6.0.1
363+
with:
364+
fetch-depth: 0
365+
submodules: recursive
366+
- name: Install Dependencies
367+
run: |
368+
brew bundle --file=cpp/Brewfile
369+
- name: Setup ccache
370+
run: |
371+
ci/scripts/ccache_setup.sh
372+
- name: ccache info
373+
id: ccache-info
374+
run: |
375+
echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT
376+
- name: Cache ccache
377+
uses: actions/cache@v5.0.2
378+
with:
379+
path: ${{ steps.ccache-info.outputs.cache-dir }}
380+
key: cpp-odbc-ccache-macos-${{ matrix.macos-version }}-${{ hashFiles('cpp/**') }}
381+
restore-keys: cpp-odbc-ccache-macos-${{ matrix.macos-version }}-
382+
- name: Build
383+
run: |
384+
# Homebrew uses /usr/local as prefix. So packages
385+
# installed by Homebrew also use /usr/local/include. We
386+
# want to include headers for packages installed by
387+
# Homebrew as system headers to ignore warnings in them.
388+
# But "-isystem /usr/local/include" isn't used by CMake
389+
# because /usr/local/include is marked as the default
390+
# include path. So we disable -Werror to avoid build error
391+
# by warnings from packages installed by Homebrew.
392+
export BUILD_WARNING_LEVEL=PRODUCTION
393+
LIBIODBC_DIR="$(brew --cellar libiodbc)/$(brew list --versions libiodbc | awk '{print $2}')"
394+
ODBC_INCLUDE_DIR=$LIBIODBC_DIR/include
395+
export ARROW_CMAKE_ARGS="-DODBC_INCLUDE_DIR=$ODBC_INCLUDE_DIR"
396+
export CXXFLAGS="$CXXFLAGS -I$ODBC_INCLUDE_DIR"
397+
ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
398+
- name: Test
399+
shell: bash
400+
run: |
401+
sudo sysctl -w kern.coredump=1
402+
sudo sysctl -w kern.corefile=/tmp/core.%N.%P
403+
ulimit -c unlimited # must enable within the same shell
404+
ci/scripts/cpp_test.sh $(pwd) $(pwd)/build
405+
406+
odbc-msvc:
407+
needs: check-labels
408+
name: ODBC Windows
342409
runs-on: windows-2022
343410
if: >-
344411
needs.check-labels.outputs.force == 'true' ||
@@ -352,6 +419,9 @@ jobs:
352419
ARROW_BUILD_STATIC: OFF
353420
ARROW_BUILD_TESTS: ON
354421
ARROW_BUILD_TYPE: release
422+
# Turn Arrow CSV off to disable `find_package(Arrow)` check on MSVC CI.
423+
# GH-49050 TODO: enable `find_package(Arrow)` check on MSVC CI.
424+
ARROW_CSV: OFF
355425
ARROW_DEPENDENCY_SOURCE: VCPKG
356426
ARROW_FLIGHT_SQL_ODBC: ON
357427
ARROW_FLIGHT_SQL_ODBC_INSTALLER: ON
@@ -434,10 +504,15 @@ jobs:
434504
shell: cmd
435505
run: |
436506
call "cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd" ${{ github.workspace }}\build\cpp\%ARROW_BUILD_TYPE%\arrow_flight_sql_odbc.dll
437-
# GH-48270 TODO: Resolve segementation fault during Arrow library unload
438-
# GH-48269 TODO: Enable Flight & Flight SQL testing in MSVC CI
439-
# GH-48547 TODO: enable ODBC tests after GH-48270 and GH-48269 are resolved.
440-
507+
- name: Test
508+
shell: cmd
509+
run: |
510+
set VCPKG_ROOT_KEEP=%VCPKG_ROOT%
511+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
512+
set VCPKG_ROOT=%VCPKG_ROOT_KEEP%
513+
# Convert VCPKG Windows path to MSYS path
514+
for /f "usebackq delims=" %%I in (`bash -c "cygpath -u \"$VCPKG_ROOT_KEEP\""` ) do set VCPKG_ROOT=%%I
515+
bash -c "ci/scripts/cpp_test.sh $(pwd) $(pwd)/build"
441516
- name: Install WiX Toolset
442517
shell: pwsh
443518
run: |
@@ -455,11 +530,46 @@ jobs:
455530
uses: actions/upload-artifact@v6
456531
with:
457532
name: flight-sql-odbc-msi-installer
458-
path: build/cpp/Apache Arrow Flight SQL ODBC-*-win64.msi
533+
path: build/cpp/Apache-Arrow-Flight-SQL-ODBC-*-win64.msi
459534
if-no-files-found: error
535+
- name: Install ODBC MSI
536+
run: |
537+
cd build/cpp
538+
$odbc_msi = Get-ChildItem -Filter "Apache-Arrow-Flight-SQL-ODBC-*-win64.msi"
539+
if (-not $odbc_msi) {
540+
Write-Error "ODBC MSI not found"
541+
exit 1
542+
}
543+
544+
foreach ($msi in $odbc_msi) {
545+
Write-Host "Installing $($msi.Name) with logs"
546+
$log = "odbc-install.log"
547+
Start-Process msiexec.exe -Wait -ArgumentList "/i `"$msi`"", "/qn", "/L*V `"$log`""
548+
Get-Content $log
549+
}
550+
- name: Check ODBC DLL installation
551+
run: |
552+
$dirs = Get-ChildItem "C:\Program Files" -Directory -Filter "Apache-Arrow-Flight-SQL-ODBC*"
553+
554+
foreach ($dir in $dirs) {
555+
$bin = Join-Path $dir.FullName "bin"
556+
557+
if (Test-Path $bin) {
558+
tree $bin /f
559+
560+
$dll = Join-Path $bin "arrow_flight_sql_odbc.dll"
561+
if (Test-Path $dll) {
562+
Write-Host "Found ODBC DLL: $dll"
563+
exit 0
564+
}
565+
}
566+
}
567+
568+
Write-Error "ODBC DLL not found"
569+
exit 1
460570
461571
odbc-nightly:
462-
needs: odbc
572+
needs: odbc-msvc
463573
name: ODBC nightly
464574
runs-on: ubuntu-latest
465575
if: github.event_name == 'schedule' && github.repository == 'apache/arrow'
@@ -472,6 +582,16 @@ jobs:
472582
run: |
473583
mkdir odbc-installer
474584
mv *.msi odbc-installer/
585+
586+
# Add `dev-yyyy-mm-dd` to ODBC MSI before `win64.msi`:
587+
# Apache Arrow Flight SQL ODBC-24.0.0-win64.msi ->
588+
# Apache Arrow Flight SQL ODBC-24.0.0-dev-2026-02-06-win64.msi
589+
cd odbc-installer
590+
msi_name=$(ls *.msi)
591+
dev_msi_name=$(echo ${msi_name} | sed -e "s/win64\.msi$/dev-$(date +%Y-%m-%d)-win64.msi/")
592+
mv "${msi_name}" "${dev_msi_name}"
593+
cd ..
594+
475595
tree odbc-installer
476596
- name: Checkout Arrow
477597
uses: actions/checkout@v6
@@ -494,13 +614,47 @@ jobs:
494614
remote_key: ${{ secrets.NIGHTLIES_RSYNC_KEY }}
495615
remote_host_key: ${{ secrets.NIGHTLIES_RSYNC_HOST_KEY }}
496616

617+
odbc-release:
618+
needs: odbc-msvc
619+
name: ODBC release
620+
runs-on: ubuntu-latest
621+
if: ${{ startsWith(github.ref_name, 'apache-arrow-') && contains(github.ref_name, '-rc') }}
622+
permissions:
623+
# Upload to GitHub Release
624+
contents: write
625+
steps:
626+
- name: Checkout Arrow
627+
uses: actions/checkout@v6
628+
with:
629+
fetch-depth: 0
630+
submodules: recursive
631+
- name: Download the artifacts
632+
uses: actions/download-artifact@v7
633+
with:
634+
name: flight-sql-odbc-msi-installer
635+
- name: Wait for creating GitHub Release
636+
env:
637+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
638+
run: |
639+
dev/release/utils-watch-gh-workflow.sh \
640+
${GITHUB_REF_NAME} \
641+
release_candidate.yml
642+
- name: Upload the artifacts to GitHub Release
643+
env:
644+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
645+
run: |
646+
gh release upload ${GITHUB_REF_NAME} \
647+
--clobber \
648+
Apache-Arrow-Flight-SQL-ODBC-*-win64.msi
649+
497650
report-extra-cpp:
498651
if: github.event_name == 'schedule' && always()
499652
needs:
500653
- docker
501654
- jni-linux
502655
- jni-macos
503656
- msvc-arm64
504-
- odbc
657+
- odbc-macos
658+
- odbc-msvc
505659
uses: ./.github/workflows/report_ci.yml
506660
secrets: inherit

.github/workflows/cpp_windows.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@ jobs:
4141
runs-on: ${{ inputs.os }}
4242
timeout-minutes: 60
4343
env:
44+
ARROW_AZURE: ON
4445
ARROW_BOOST_USE_SHARED: OFF
4546
ARROW_BUILD_BENCHMARKS: ON
4647
ARROW_BUILD_SHARED: ON
4748
ARROW_BUILD_STATIC: OFF
4849
ARROW_BUILD_TESTS: ON
4950
ARROW_DATASET: ON
51+
ARROW_FILESYSTEM: ON
5052
ARROW_FLIGHT: OFF
5153
ARROW_HDFS: ON
5254
ARROW_HOME: /usr

.github/workflows/package_linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ jobs:
218218
rake version:update
219219
popd
220220
- name: Login to GitHub Container registry
221-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
221+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
222222
with:
223223
registry: ghcr.io
224224
username: ${{ github.actor }}

.github/workflows/python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ jobs:
6969
- conda-python-3.12-no-numpy
7070
include:
7171
- name: conda-python-docs
72-
cache: conda-python-3.10
72+
cache: conda-python-3.11
7373
image: conda-python-docs
74-
title: AMD64 Conda Python 3.10 Sphinx & Numpydoc
75-
python: "3.10"
74+
title: AMD64 Conda Python 3.11 Sphinx & Numpydoc
75+
python: "3.11"
7676
- name: conda-python-3.11-nopandas
7777
cache: conda-python-3.11
7878
image: conda-python

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ repos:
337337
?^ci/scripts/python_sdist_build\.sh$|
338338
?^ci/scripts/python_sdist_test\.sh$|
339339
?^ci/scripts/python_wheel_unix_test\.sh$|
340+
?^ci/scripts/python_test_type_annotations\.sh$|
340341
?^ci/scripts/r_build\.sh$|
341342
?^ci/scripts/r_revdepcheck\.sh$|
342343
?^ci/scripts/release_test\.sh$|
@@ -377,6 +378,7 @@ repos:
377378
# TODO: Remove this when we fix all lint failures
378379
files: >-
379380
(
381+
?^ci/scripts/python_test_type_annotations\.sh$|
380382
?^dev/release/05-binary-upload\.sh$|
381383
?^dev/release/binary-recover\.sh$|
382384
?^dev/release/post-03-binary\.sh$|

ci/conda_env_python.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ cython>=3.1
2424
cloudpickle
2525
fsspec
2626
hypothesis
27+
libcst>=1.8.6
2728
numpy>=1.16.6
2829
pytest
2930
pytest-faulthandler

ci/docker/python-wheel-manylinux.dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,5 @@ RUN PYTHON_ROOT=$(find /opt/python -name cp${PYTHON_VERSION/./}-${PYTHON_ABI_TAG
113113
SHELL ["/bin/bash", "-i", "-c"]
114114
ENTRYPOINT ["/bin/bash", "-i", "-c"]
115115

116-
# Remove once there are released Cython wheels for 3.13 free-threaded available
117-
RUN if [ "${python_abi_tag}" = "cp313t" ]; then \
118-
pip install cython --pre --extra-index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" --prefer-binary ; \
119-
fi
120-
121116
COPY python/requirements-wheel-build.txt /arrow/python/
122117
RUN pip install -r /arrow/python/requirements-wheel-build.txt

ci/scripts/cpp_test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ case "$(uname)" in
5959
;;
6060
Darwin)
6161
n_jobs=$(sysctl -n hw.ncpu)
62+
exclude_tests+=("arrow-flight-sql-odbc-test")
6263
# TODO: https://github.com/apache/arrow/issues/40410
6364
exclude_tests+=("arrow-s3fs-test")
6465
;;

ci/scripts/python_build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ export PYARROW_PARALLEL=${n_jobs}
8181
: "${CMAKE_PREFIX_PATH:=${ARROW_HOME}}"
8282
export CMAKE_PREFIX_PATH
8383
export LD_LIBRARY_PATH=${ARROW_HOME}/lib:${LD_LIBRARY_PATH}
84+
export DYLD_LIBRARY_PATH=${ARROW_HOME}/lib${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
8485

8586
# https://github.com/apache/arrow/issues/41429
8687
# TODO: We want to out-of-source build. This is a workaround. We copy

0 commit comments

Comments
 (0)