This is an automated email from the ASF dual-hosted git repository.
kou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/main by this push:
new 50c2fc2656e GH-53818: [C++][FlightRPC][ODBC] Fix Windows ODBC
Installer Registering Empty Driver and Setup Paths (#53819)
50c2fc2656e is described below
commit 50c2fc2656e4cb2a8ca57d7014b8143b47ec1eb9
Author: Alina (Xi) Li <[email protected]>
AuthorDate: Thu Oct 15 21:49:21 2026 -0700
GH-53818: [C++][FlightRPC][ODBC] Fix Windows ODBC Installer Registering
Empty Driver and Setup Paths (#53819)
### Rationale for this change
https://github.com/apache/arrow/issues/53818
### What changes are included in this PR?
- Resolve bug where Windows ODBC installer registers empty `Driver` and
`Setup` values. Both values should point to the actual installed driver path.
- Add CI verification for Windows ODBC registration values
### Are these changes tested?
- Yes, tested in CI
### Are there any user-facing changes?
Yes. This fixes a packaging bug of the Windows ODBC installer.
### Was AI used for this PR?
In accordance to the [AI generation
guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code),
please disclose below whether and how AI was used in this PR.
**PR code and description written by:**
- [x] Human
- [x] AI
**Reviewed before submission by:**
- [x] Human
- [x] AI
- [ ] Not reviewed
* GitHub Issue: #53818
Authored-by: Alina (Xi) Li <[email protected]>
Signed-off-by: Sutou Kouhei <[email protected]>
---
.github/workflows/cpp_extra.yml | 23 ++++++++++++++++++++++
cpp/src/arrow/flight/sql/odbc/CMakeLists.txt | 3 +++
.../odbc/install/windows/arrow-flight-sql-odbc.wxs | 9 ++++++---
3 files changed, 32 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml
index e29fa71035f..6e6e4a61d1a 100644
--- a/.github/workflows/cpp_extra.yml
+++ b/.github/workflows/cpp_extra.yml
@@ -907,6 +907,29 @@ jobs:
$dll = Join-Path $bin "arrow_flight_sql_odbc.dll"
if (Test-Path $dll) {
Write-Host "Found ODBC DLL: $dll"
+
+ # Verify ODBC driver registration values
+ $key = "HKLM:\SOFTWARE\ODBC\ODBCINST.INI\Apache Arrow Flight
SQL ODBC Driver"
+ if (-not (Test-Path $key)) {
+ Write-Error "ODBC driver registry key not found: $key"
+ exit 1
+ }
+ $props = Get-ItemProperty $key
+ foreach ($name in "Driver", "Setup") {
+ Write-Host "$name = '$($props.$name)'"
+ if ($props.$name -ne $dll) {
+ Write-Error "Registry value '$name' should be '$dll'"
+ exit 1
+ }
+ }
+ if ($props.DriverODBCVer -ne "03.00") {
+ Write-Error "Registry value 'DriverODBCVer' should be
'03.00', got '$($props.DriverODBCVer)'"
+ exit 1
+ }
+ if ($props.UsageCount -ne 1) {
+ Write-Error "Registry value 'UsageCount' should be 1, got
'$($props.UsageCount)'"
+ exit 1
+ }
exit 0
}
}
diff --git a/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
b/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
index 178d144bac3..a280eb6260f 100644
--- a/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
+++ b/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
@@ -255,6 +255,9 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)
# Load CPack after all CPACK* variables are set
include(CPack)
+ # The component name is part of the CPack file ID referenced in
+ # install/windows/arrow-flight-sql-odbc.wxs (CM_FP_ArrowFlightSQLODBC.*).
+ # Update the .wxs if it is renamed.
cpack_add_component(ArrowFlightSQLODBC
DISPLAY_NAME "ODBC library"
DESCRIPTION "Apache Arrow Flight SQL ODBC library bin,
required to install"
diff --git
a/cpp/src/arrow/flight/sql/odbc/install/windows/arrow-flight-sql-odbc.wxs
b/cpp/src/arrow/flight/sql/odbc/install/windows/arrow-flight-sql-odbc.wxs
index faf009b1cef..067be179b6b 100644
--- a/cpp/src/arrow/flight/sql/odbc/install/windows/arrow-flight-sql-odbc.wxs
+++ b/cpp/src/arrow/flight/sql/odbc/install/windows/arrow-flight-sql-odbc.wxs
@@ -25,10 +25,13 @@
<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 -->
+ <!-- CM_FP_ArrowFlightSQLODBC.bin.arrow_flight_sql_odbc.dll is
the file ID generated by CPack in
+ build\_CPack_Packages\win64\WIX\files.wxs. Its format is
CM_FP_<CPack component name>.<install path>,
+ so it must be updated if the ArrowFlightSQLODBC component
in odbc/CMakeLists.txt is renamed.
+ If the ID does not match, Driver and Setup are silently
registered as empty. -->
<RegistryValue Type="string" Name="DriverODBCVer"
Value="03.00"/>
- <RegistryValue Type="string" Name="Driver"
Value="[#CM_FP_arrow_flight_sql_odbc.bin.arrow_flight_sql_odbc.dll]"/>
- <RegistryValue Type="string" Name="Setup"
Value="[#CM_FP_arrow_flight_sql_odbc.bin.arrow_flight_sql_odbc.dll]"/>
+ <RegistryValue Type="string" Name="Driver"
Value="[#CM_FP_ArrowFlightSQLODBC.bin.arrow_flight_sql_odbc.dll]"/>
+ <RegistryValue Type="string" Name="Setup"
Value="[#CM_FP_ArrowFlightSQLODBC.bin.arrow_flight_sql_odbc.dll]"/>
<RegistryValue Type="integer" Name="UsageCount" Value="1"/>
</RegistryKey>
</Component>