From b344d5ae515b78680bdf8989ce0e71d4542b4a05 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Wed, 14 Oct 2026 10:57:16 -0700 Subject: [PATCH 1/2] Fix ODBC driver and setup values - Add CI verification step as well --- .github/workflows/cpp_extra.yml | 19 +++++++++++++++++++ .../install/windows/arrow-flight-sql-odbc.wxs | 6 +++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml index 45f1c01a205e..a574e8b6244f 100644 --- a/.github/workflows/cpp_extra.yml +++ b/.github/workflows/cpp_extra.yml @@ -792,6 +792,25 @@ 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" + $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/install/windows/arrow-flight-sql-odbc.wxs b/cpp/src/arrow/flight/sql/odbc/install/windows/arrow-flight-sql-odbc.wxs index faf009b1ceff..ab0d394796c0 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,10 @@ - + - - + + From b6ac5d34876fbb462e2f3a269ace2739117b4ee6 Mon Sep 17 00:00:00 2001 From: "Alina (Xi) Li" Date: Wed, 14 Oct 2026 14:25:56 -0700 Subject: [PATCH 2/2] Minor fixes and comments --- .github/workflows/cpp_extra.yml | 4 ++++ cpp/src/arrow/flight/sql/odbc/CMakeLists.txt | 3 +++ .../sql/odbc/install/windows/arrow-flight-sql-odbc.wxs | 5 ++++- 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cpp_extra.yml b/.github/workflows/cpp_extra.yml index a574e8b6244f..6e7b738c91f4 100644 --- a/.github/workflows/cpp_extra.yml +++ b/.github/workflows/cpp_extra.yml @@ -795,6 +795,10 @@ jobs: # 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)'" diff --git a/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt b/cpp/src/arrow/flight/sql/odbc/CMakeLists.txt index 178d144bac32..a280eb6260fd 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 ab0d394796c0..067be179b6b6 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,7 +25,10 @@ - +