Skip to content

Conversation

@alinaliBQ
Copy link
Collaborator

@alinaliBQ alinaliBQ commented Nov 4, 2025

Rationale for this change

Implement ODBC installer code for Windows. The primary platform for ODBC is MSVC Windows. The version is set to 1.0.0.

What changes are included in this PR?

  • ODBC msi installer
  • Added components to other parts of Arrow, so we can select ODBC component for cpack

Are these changes tested?

Tested locally on MSVC Windows

Are there any user-facing changes?

N/A

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

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

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.

@lidavidm @kou This ODBC msi installer draft PR is ready for initial review. Please let me know your thoughts, thanks!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For installer to be able to select different components, we needed to add COMPONENT to other parts of Arrow cpp that gets build with ODBC.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is an image of Arrow banner

@alinaliBQ alinaliBQ changed the title GH-47787: [C++][FlightRPC] WIP: ODBC msi Windows installer GH-47787: [C++][FlightRPC] ODBC msi Windows installer Nov 11, 2025
@github-actions github-actions bot added awaiting committer review Awaiting committer review and removed awaiting review Awaiting review labels Nov 11, 2025
@alinaliBQ alinaliBQ force-pushed the gh-47787-odbc-msi-installer branch from 8487389 to 20ad8c6 Compare November 13, 2025 20:20
@alinaliBQ alinaliBQ changed the title GH-47787: [C++][FlightRPC] ODBC msi Windows installer GH-47787: [C++][FlightRPC] WIP ODBC msi Windows installer Nov 25, 2025
@alinaliBQ alinaliBQ force-pushed the gh-47787-odbc-msi-installer branch from 2728022 to 9199d85 Compare November 28, 2025 23:24
@alinaliBQ alinaliBQ changed the title GH-47787: [C++][FlightRPC] WIP ODBC msi Windows installer GH-47787: [C++][FlightRPC] ODBC msi Windows installer Dec 12, 2025
@alinaliBQ alinaliBQ force-pushed the gh-47787-odbc-msi-installer branch from 9199d85 to 6c8c099 Compare December 17, 2025 21:06
@alinaliBQ alinaliBQ marked this pull request as ready for review December 22, 2025 23:01
@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting committer review Awaiting committer review labels Dec 26, 2025
alinaliBQ and others added 2 commits January 6, 2026 14:10
Minor fix for DSN Window

So ODBC installed by installer works as intended

Change Arrow odbc component name to `arrow_flight_sql_odbc`

Add component name for `ARROW_BUILD_UTILITIES`

* change component name for Flight SQL ODBC to be more consistent

Use targets instead of hard-coded dll regex

Add `RUNTIME ` removes `.lib` file

Clean up

Attempt to fix CI ODBC msi

Add debug message for odbc bin install path

Add ODBC Installer definitions

Move path for Windows install files

Extract ODBC installer

Need to add `component` to other parts to be able to select the ODBC components

Add product ID to Windows installer

With stable product and upgrade id, Windows will be able to properly recognize ODBC installer as the same product, and prevent double-installation from happening.

Update README

Co-Authored-By: vic-tsang <victor.tsang@improving.com>
Co-Authored-By: alinalibq <alina.li@improving.com>
@alinaliBQ alinaliBQ force-pushed the gh-47787-odbc-msi-installer branch from 9c24910 to 6731c9c Compare January 6, 2026 22:11
@github-actions github-actions bot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Jan 6, 2026
run: |
# Verify WiX version
wix --version
cd "${{ github.workspace }}\build\cpp"
Copy link
Member

Choose a reason for hiding this comment

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

Can we simplify this?

Suggested change
cd "${{ github.workspace }}\build\cpp"
cd "build\cpp"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yea, fixed

uses: actions/upload-artifact@v6
with:
name: flight-sql-odbc-msi-installer
path: ${{ github.workspace }}\build\cpp\Apache Arrow Flight SQL ODBC-1.0.0-win64.msi
Copy link
Member

Choose a reason for hiding this comment

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

Can we simplify this?

Suggested change
path: ${{ github.workspace }}\build\cpp\Apache Arrow Flight SQL ODBC-1.0.0-win64.msi
path: build\cpp\Apache Arrow Flight SQL ODBC-1.0.0-win64.msi

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, removed ${{ github.workspace }}

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="windows-1252"?>
Copy link
Member

Choose a reason for hiding this comment

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

Is windows-1252 expected?
Can we use UTF-8 instead?

<RegistryKey Root="HKLM"
Key="Software\ODBC\ODBCINST.INI\Apache Arrow Flight SQL ODBC Driver">
<!-- CM_FP_arrow_flight_sql_odbc.bin.arrow_flight_sql_odbc.dll is a generated variable value from build\_CPack_Packages\win64\WIX\files.wxs -->
<RegistryValue Type="string" Name="DriverODBCVer" Value="03.00"/>
Copy link
Member

Choose a reason for hiding this comment

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

Is this the version of our Flight SQL ODBC version?

Can we use the same version as Apache Arrow C++?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

DriverODBCVer refers to the ODBC API version which is 3.0 for Flight SQL ODBC. The Flight SQL ODBC driver version is set by ODBC_PACKAGE_VERSION_* variables in CMake

Copy link
Member

Choose a reason for hiding this comment

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

Oh, sorry.

Comment on lines 40 to 42
set(ODBC_PACKAGE_VERSION_MAJOR "1")
set(ODBC_PACKAGE_VERSION_MINOR "0")
set(ODBC_PACKAGE_VERSION_PATCH "0")
Copy link
Member

Choose a reason for hiding this comment

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

Can we use the same version as Apache Arrow C++?

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, I have changed these values to corresponding arrow_VERSION_*.

// under the License.

#define VER_FILEVERSION @VER_FILEVERSION@
#define VER_FILEVERSION_STR "@VER_FILEVERSION_STR@\0"
Copy link
Member

Choose a reason for hiding this comment

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

Is \0 needed?

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 I think so, I think it's because a null-terminated string is expected. I got it (\0) from Msft example here.

set(CPACK_PACKAGE_NAME ${ODBC_PACKAGE_NAME})
set(CPACK_PACKAGE_VENDOR ${ODBC_PACKAGE_VENDOR})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Arrow Flight SQL ODBC Driver")
set(CPACK_PACKAGE_CONTACT "#GH-47787 TODO arrow maintainers")
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 need an e-mail address here?
If so, could you use dev@arrow.apache.org?

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 email addresses are needed. I have changed it to dev@arrow.apache.org, thanks!

Comment on lines 160 to 161
DISPLAY_NAME "ODBC library"
DESCRIPTION "ODBC library bin, required to install"
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure whether this is used but do we need to include "Apache Arrow Flight SQL" or something in them?

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 DESCRIPTION is used, and I have included "Apache Arrow Flight SQL". I don't hold a strong opinion on the DESCRIPTION value.

This is what it looks like in the installer :
image

Copy link
Member

Choose a reason for hiding this comment

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

Could you add .md extension?

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. Done

iii. Run script to register your ODBC DLL as Apache Arrow Flight SQL ODBC Driver
`.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd <path\to\repo>\cpp\build\< release | debug >\< Release | Debug>\arrow_flight_sql_odbc.dll`
Example command for reference:
`.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd C:\path\to\arrow\cpp\build\release\Release\arrow_flight_sql_odbc.dll`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd C:\path\to\arrow\cpp\build\release\Release\arrow_flight_sql_odbc.dll`
Need to replace <path\to\repo> with actual path to repository in the commands.
1. `cd to repo.`
2. `cd <path\to\repo>`
3. Run script to register your ODBC DLL as Apache Arrow Flight SQL ODBC Driver
```
.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd <path\to\repo>\cpp\build\< release | debug >\< Release | Debug>\arrow_flight_sql_odbc.dll
```
Example command for reference:
```
.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd C:\path\to\arrow\cpp\build\release\Release\arrow_flight_sql_odbc.dll
```

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@github-actions github-actions bot added awaiting changes Awaiting changes and removed awaiting change review Awaiting change review labels Jan 7, 2026
- Simplify CI
- Update installer files
- Update README.md

Change to `README.md`
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.

@kou Thanks for the review. All comments have been addressed

run: |
# Verify WiX version
wix --version
cd "${{ github.workspace }}\build\cpp"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yea, fixed

uses: actions/upload-artifact@v6
with:
name: flight-sql-odbc-msi-installer
path: ${{ github.workspace }}\build\cpp\Apache Arrow Flight SQL ODBC-1.0.0-win64.msi
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, removed ${{ github.workspace }}

<RegistryKey Root="HKLM"
Key="Software\ODBC\ODBCINST.INI\Apache Arrow Flight SQL ODBC Driver">
<!-- CM_FP_arrow_flight_sql_odbc.bin.arrow_flight_sql_odbc.dll is a generated variable value from build\_CPack_Packages\win64\WIX\files.wxs -->
<RegistryValue Type="string" Name="DriverODBCVer" Value="03.00"/>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

DriverODBCVer refers to the ODBC API version which is 3.0 for Flight SQL ODBC. The Flight SQL ODBC driver version is set by ODBC_PACKAGE_VERSION_* variables in CMake

Comment on lines 40 to 42
set(ODBC_PACKAGE_VERSION_MAJOR "1")
set(ODBC_PACKAGE_VERSION_MINOR "0")
set(ODBC_PACKAGE_VERSION_PATCH "0")
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, I have changed these values to corresponding arrow_VERSION_*.

set(ODBC_PACKAGE_VERSION_MINOR "0")
set(ODBC_PACKAGE_VERSION_PATCH "0")
set(ODBC_PACKAGE_NAME "Apache Arrow Flight SQL ODBC")
set(ODBC_PACKAGE_VENDOR "Apache Arrow")
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, fixed

// under the License.

#define VER_FILEVERSION @VER_FILEVERSION@
#define VER_FILEVERSION_STR "@VER_FILEVERSION_STR@\0"
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 I think so, I think it's because a null-terminated string is expected. I got it (\0) from Msft example here.

set(CPACK_PACKAGE_NAME ${ODBC_PACKAGE_NAME})
set(CPACK_PACKAGE_VENDOR ${ODBC_PACKAGE_VENDOR})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Arrow Flight SQL ODBC Driver")
set(CPACK_PACKAGE_CONTACT "#GH-47787 TODO arrow maintainers")
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 email addresses are needed. I have changed it to dev@arrow.apache.org, thanks!

Comment on lines 160 to 161
DISPLAY_NAME "ODBC library"
DESCRIPTION "ODBC library bin, required to install"
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 DESCRIPTION is used, and I have included "Apache Arrow Flight SQL". I don't hold a strong opinion on the DESCRIPTION value.

This is what it looks like in the installer :
image

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. Done

iii. Run script to register your ODBC DLL as Apache Arrow Flight SQL ODBC Driver
`.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd <path\to\repo>\cpp\build\< release | debug >\< Release | Debug>\arrow_flight_sql_odbc.dll`
Example command for reference:
`.\cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd C:\path\to\arrow\cpp\build\release\Release\arrow_flight_sql_odbc.dll`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

@github-actions github-actions bot added Component: Documentation awaiting change review Awaiting change review awaiting changes Awaiting changes and removed awaiting changes Awaiting changes awaiting change review Awaiting change review labels Jan 7, 2026
Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

+1

@kou kou merged commit 45cf928 into apache:main Jan 8, 2026
48 of 53 checks passed
@kou kou removed the awaiting changes Awaiting changes label Jan 8, 2026
@github-actions github-actions bot added the awaiting merge Awaiting merge label Jan 8, 2026
@conbench-apache-arrow
Copy link

After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 45cf928.

There weren't enough matching historic benchmark results to make a call on whether there were regressions.

The full Conbench report has more details.

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.

3 participants