Skip to content

Conversation

@alinaliBQ
Copy link
Collaborator

@alinaliBQ alinaliBQ commented Dec 17, 2025

Rationale for this change

#48576

What changes are included in this PR?

  • Added Mac Setup ODBC ini Script

Are these changes tested?

Script is tested in CI.
Tested locally on macOS.

Are there any user-facing changes?

N/A

@github-actions
Copy link

⚠️ GitHub issue #48576 has been automatically assigned in GitHub to PR creator.

@alinaliBQ
Copy link
Collaborator Author

@lidavidm This draft PR for macOS ODBC registration set up script is ready for review. It is pending on #48577 to undraft.

@lidavidm lidavidm changed the title GH-48576: [C++][FlightRPC] Mac Setup ODBC ini Script GH-48576: [C++][FlightRPC] ODBC: add Mac setup script Jan 5, 2026
Copy link
Member

@lidavidm lidavidm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to guard the scripts with (e.g.) set -euo pipefail?

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Jan 5, 2026
odbc_install_script="${source_dir}/install_odbc.sh"

chmod +x "$odbc_install_script"
. "$odbc_install_script" /Library/Apache/ArrowFlightSQLODBC/lib/libarrow_flight_sql_odbc.dylib
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have to source the script?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching it, I think it is not necessary. Removed sourcing of the script.

@alinaliBQ alinaliBQ force-pushed the gh-48576-macos-ini-script branch from 3292db5 to c64342b Compare January 6, 2026 23:14
Copy link
Collaborator Author

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review David, addressed all comments

odbc_install_script="${source_dir}/install_odbc.sh"

chmod +x "$odbc_install_script"
. "$odbc_install_script" /Library/Apache/ArrowFlightSQLODBC/lib/libarrow_flight_sql_odbc.dylib
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching it, I think it is not necessary. Removed sourcing of the script.

@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jan 6, 2026
@alinaliBQ
Copy link
Collaborator Author

Is it possible to guard the scripts with (e.g.) set -euo pipefail?

@lidavidm Yes, I have added the guards at the beginning of scripts.

@@ -0,0 +1,78 @@
#!/bin/sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we using plain sh, or assuming something else (zsh on macOS?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch and I have changed to use #!/bin/bash. The scripts assume bash shells on macOS are used.

@github-actions github-actions bot added awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting change review Awaiting change review awaiting changes Awaiting changes labels Jan 7, 2026
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Jan 8, 2026
@alinaliBQ alinaliBQ force-pushed the gh-48576-macos-ini-script branch from 3d97d65 to 8045be2 Compare February 10, 2026 00:00
@github-actions github-actions bot added the CI: Extra: C++ Run extra C++ CI label Feb 10, 2026
@alinaliBQ alinaliBQ force-pushed the gh-48576-macos-ini-script branch from 5c55ed2 to c0c1ce4 Compare February 10, 2026 21:44
@alinaliBQ alinaliBQ marked this pull request as ready for review February 10, 2026 21:44
@alinaliBQ alinaliBQ requested a review from raulcd as a code owner February 10, 2026 21:44
@alinaliBQ
Copy link
Collaborator Author

@lidavidm This PR is ready for review! Please have a look

ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
- name: Register Flight SQL ODBC Driver
run: |
chmod +x cpp/src/arrow/flight/sql/odbc/install/mac/install_odbc.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the script just be marked executable when checked into git?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. I think the script was already marked executable, I have removed the unneeded chmod +x line

@@ -0,0 +1,85 @@
#!/bin/bash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now this file isn't used anywhere, is it? Should we add it when we are using it if we plan to follow up with other PRs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's fair. I have removed this file from this PR

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting merge Awaiting merge labels Feb 11, 2026
vic-tsang and others added 6 commits February 11, 2026 09:58
* added setup script for mac and platform folders

Co-Authored-By: Alina (Xi) Li <alina.li@improving.com>
Co-Authored-By: vic-tsang <victor.tsang@improving.com>

Update install_odbc.sh
- Moved admin check upwards
- removed sourcing of script that isn't required
The scripts assume bash shells on macOS are used.
The scripts are already executable. `chmod +x` should not be needed
@alinaliBQ alinaliBQ force-pushed the gh-48576-macos-ini-script branch from c0c1ce4 to 7a0e164 Compare February 11, 2026 18:46
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Feb 11, 2026
Copy link
Collaborator Author

@alinaliBQ alinaliBQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed comments

ci/scripts/cpp_build.sh $(pwd) $(pwd)/build
- name: Register Flight SQL ODBC Driver
run: |
chmod +x cpp/src/arrow/flight/sql/odbc/install/mac/install_odbc.sh
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup. I think the script was already marked executable, I have removed the unneeded chmod +x line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants