-
Notifications
You must be signed in to change notification settings - Fork 4.2k
GH-49463: [C++][FlightRPC] Add Ubuntu ODBC Support #49564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
848fdfe
9d6728d
bec15db
07b9ef4
0fa6143
0b5d6f1
2a49313
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -336,6 +336,64 @@ jobs: | |||||||||||||||||||||||
| cd cpp/examples/minimal_build | ||||||||||||||||||||||||
| ../minimal_build.build/arrow-example | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| odbc-linux: | ||||||||||||||||||||||||
| needs: check-labels | ||||||||||||||||||||||||
| name: ODBC Linux | ||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||
| if: >- | ||||||||||||||||||||||||
| needs.check-labels.outputs.force == 'true' || | ||||||||||||||||||||||||
| contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') || | ||||||||||||||||||||||||
| contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++') | ||||||||||||||||||||||||
| timeout-minutes: 75 | ||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||
| ARCH: amd64 | ||||||||||||||||||||||||
| ARCHERY_DEBUG: 1 | ||||||||||||||||||||||||
| ARROW_ENABLE_TIMING_TESTS: OFF | ||||||||||||||||||||||||
| CLANG_TOOLS: 18 | ||||||||||||||||||||||||
| DOCKER_VOLUME_PREFIX: ".docker/" | ||||||||||||||||||||||||
| LLVM: 18 | ||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this? We don't enable Gandiva, right?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea this env var isn't needed, removed. |
||||||||||||||||||||||||
| UBUNTU: 24.04 | ||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||
| - name: Checkout Arrow | ||||||||||||||||||||||||
| uses: actions/checkout@v6 | ||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||
| submodules: recursive | ||||||||||||||||||||||||
| - name: Cache Docker Volumes | ||||||||||||||||||||||||
| uses: actions/cache@v5 | ||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||
| path: .docker | ||||||||||||||||||||||||
| key: ubuntu-cpp-odbc-${{ hashFiles('cpp/**') }} | ||||||||||||||||||||||||
| restore-keys: ubuntu-cpp-odbc- | ||||||||||||||||||||||||
| - name: Setup Python on hosted runner | ||||||||||||||||||||||||
| uses: actions/setup-python@v6 | ||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||
| python-version: 3 | ||||||||||||||||||||||||
| - name: Setup Archery | ||||||||||||||||||||||||
| run: python3 -m pip install -e dev/archery[docker] | ||||||||||||||||||||||||
| - name: Execute Docker Build | ||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||
| ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }} | ||||||||||||||||||||||||
| ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} | ||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||
| # GH-40558: reduce ASLR to avoid ASAN/LSAN crashes | ||||||||||||||||||||||||
| sudo sysctl -w vm.mmap_rnd_bits=28 | ||||||||||||||||||||||||
| source ci/scripts/util_enable_core_dumps.sh | ||||||||||||||||||||||||
| archery docker run ubuntu-cpp-odbc | ||||||||||||||||||||||||
| - name: Docker Push | ||||||||||||||||||||||||
| if: >- | ||||||||||||||||||||||||
| success() && | ||||||||||||||||||||||||
| github.event_name == 'push' && | ||||||||||||||||||||||||
| github.repository == 'apache/arrow' && | ||||||||||||||||||||||||
| github.ref_name == 'main' | ||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||
| ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }} | ||||||||||||||||||||||||
| ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} | ||||||||||||||||||||||||
| continue-on-error: true | ||||||||||||||||||||||||
| run: archery docker push ubuntu-cpp-odbc | ||||||||||||||||||||||||
|
Comment on lines
+383
to
+393
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We don't need this image because we can reuse
Suggested change
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hi kou, I used
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Your approach is correct. I also think that I want to create a new service (
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kou Sounds good. I have changed |
||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
| odbc-macos: | ||||||||||||||||||||||||
| needs: check-labels | ||||||||||||||||||||||||
| name: ODBC ${{ matrix.build-type }} ${{ matrix.architecture }} macOS ${{ matrix.macos-version }} | ||||||||||||||||||||||||
|
|
@@ -435,7 +493,7 @@ jobs: | |||||||||||||||||||||||
| "$(pwd)/build/cpp/${{ matrix.build-type }}/libarrow_flight_sql_odbc.dylib" | ||||||||||||||||||||||||
| - name: Register Flight SQL ODBC Driver | ||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||
| sudo cpp/src/arrow/flight/sql/odbc/install/mac/install_odbc.sh $(pwd)/build/cpp/${{ matrix.build-type }}/libarrow_flight_sql_odbc.dylib | ||||||||||||||||||||||||
| sudo cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh $(pwd)/build/cpp/${{ matrix.build-type }}/libarrow_flight_sql_odbc.dylib | ||||||||||||||||||||||||
| - name: Test | ||||||||||||||||||||||||
| shell: bash | ||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||
|
|
@@ -698,6 +756,7 @@ jobs: | |||||||||||||||||||||||
| - jni-linux | ||||||||||||||||||||||||
| - jni-macos | ||||||||||||||||||||||||
| - msvc-arm64 | ||||||||||||||||||||||||
| - odbc-linux | ||||||||||||||||||||||||
| - odbc-macos | ||||||||||||||||||||||||
| - odbc-msvc | ||||||||||||||||||||||||
| - odbc-nightly | ||||||||||||||||||||||||
|
|
||||||||||||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you also update
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes good catch, updated |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,7 +40,16 @@ if [ ! -f "$ODBC_64BIT" ]; then | |
| exit 1 | ||
| fi | ||
|
|
||
| USER_ODBCINST_FILE="$HOME/Library/ODBC/odbcinst.ini" | ||
| case "$(uname)" in | ||
| Linux) | ||
| USER_ODBCINST_FILE="/etc/odbcinst.ini" | ||
| ;; | ||
| *) | ||
| # macOS | ||
| USER_ODBCINST_FILE="$HOME/Library/ODBC/odbcinst.ini" | ||
| ;; | ||
| esac | ||
|
|
||
| DRIVER_NAME="Apache Arrow Flight SQL ODBC Driver" | ||
|
|
||
| mkdir -p "$HOME"/Library/ODBC | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we update this too?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, I have moved the command for macOS only |
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be removed, fixed. Good catch