ODBC Standalone MSVC Build CI - #140
Merged
Merged
Conversation
alinaliBQ
force-pushed
the
odbc-standalone-ci
branch
2 times, most recently
from
November 25, 2025 20:07
d7a482e to
eb52920
Compare
alinaliBQ
force-pushed
the
odbc-standalone-ci
branch
2 times, most recently
from
November 27, 2025 18:39
2281e9d to
53993c7
Compare
alinaliBQ
marked this pull request as ready for review
November 27, 2025 18:42
justing-bq
reviewed
Nov 28, 2025
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| name: C++ ODBC |
There was a problem hiding this comment.
Is the idea to move all of our ODBC CI stuff in here (including MacOS)?
Author
There was a problem hiding this comment.
It depends on where the community would like to see things go. If our ODBC stuff works on the current macOS CI without extra changes, then I think it's ok to leave ODBC in macOS in cpp.yml, so we wil see.
We needed a new ODBC workflow for Windows because there isn't a release Windows build in the CIs, and ODBC tests in CI are blocked right now
alinaliBQ
force-pushed
the
apache-odbc
branch
from
December 1, 2025 19:04
7df62c8 to
ba3a999
Compare
alinaliBQ
force-pushed
the
odbc-standalone-ci
branch
from
December 1, 2025 19:34
3539f27 to
ee0aac8
Compare
Remove DataSet
Fix cache key
Use odbc-specific cache key
Fix Lint and Add odbc registration step
Link appropriate GitHub issues that blocks ODBC tests
Disable test phase and add schedule
Run everyday 7 am Vancouver time
Enable ODBC build on MSVC CI
Code Clean up and enable ODBC tests in CI
Still need to modify ODBCUtilEnvironment if we decide to use it. Still need to add ODBC V2 support so a different env and conn is used for ODBC 2 tests.
Draft enable ODBC global setup/teardown
Run ODBC test once outside of test script
If ODBC test is run using MinGW Shell, segfault occurs.
I am not getting any seg fault on my local MSVC Windows when I run the tests without the bash script. But if Windows CI breaks from running the standalone exe then I will look into this
Prepend vcpkg to search vcpkg before `<prefix>/lib/cmake`
Since we are installing dependencies on vcpkg, if `lib/cmake` is searched first, then cmake will look into that directory and use the wrong paths.
Convert VCPKG Windows path to MSYS path
Set `VCPKG_ROOT` in test phase
Fix ODBC dll name
Use `arrow_flight_sql_odbc.dll` instead of `libarrow_flight_sql_odbc.dll` which is the naming convention used on MinGW Windows
Link ODBC library on all platforms
On my local MSVC Windows machine, Visual Studio is used to build without needing to link ` ${ODBCINST}` explicitly, its behavior might be different from Ninja which is what CI uses.
`${ODBCINST}` is likely needed by Linux as well, so adding it for all platforms.
Attempt to resolve `arrow-compute-grouper-benchmark` build issue
I think `if(ARROW_FLIGHT_TEST_LINKAGE STREQUAL "static")` might be more appropriate here, as I am seeing build issues due to both dynamic and static linking occurring. I see in apache@59903d0, this check is used for `arrow-filesystem-s3fs-benchmark`
Disable `UNITY_BUILD` for ODBC test due to conflict on `sqlite_sql_info.cc`
On some workflows, unity build is set to ON to make the build faster. This is an attempt to resolve the build issue.
Remove debug messages
Fix lint
Add `sql_info_undef.h` to sqlite_sql_info.cc
Undefine duplicates in SQLGetInfo
Add `#pragma once` to odbc_test_suite.h
To avoid redefinition error
Attempt to resolve conflict with sql/types.h
Attempt to include Arrow headers before ODBC headers to avoid conflict with arrow/flight/sql/types.h
[apacheGH-48084] Replace boost::optional with std::optional
Addresses comment apache#40939 (comment)
Replace boost::optional with std::optional in ODBC codebase
apache#48084
Fix lint
Remove `BOOST_SOURCE=BUNDLED` to use vcpkg's dynamic link to boost
Since we need to use link to boost dynamically, we need to remove the bundled boost library flag.
Add debug messages.
Remove `ARROW_BOOST_USE_SHARED = OFF`
Since we have a release build, can enable boost as shared.
With `ARROW_BOOST_USE_SHARED = OFF`, I am getting error
```
D:\a\arrow\arrow\build\cpp\vcpkg_installed\x64-windows\include\boost/filesystem/config.hpp(96): fatal error C1189: #error: Must not define both BOOST_FILESYSTEM_DYN_LINK and BOOST_FILESYSTEM_STATIC_LINK
```
Also increased time limit, since 2 hours don't seem to be enough to finish the vcpkg build
Change to release build
Getting
```
orc.lib(Exceptions.cc.obj) : error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in unity_2_cxx.cxx.obj
orc.lib(Exceptions.cc.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in unity_2_cxx.cxx.obj
```
when building with debug and presumably ARROW_ORC
Set ARROW_BOOST_USE_SHARED to OFF
`ARROW_BOOST_USE_SHARED` is restored to `OFF`, which according to Windows doc should help with the debug build now.
Retore value of `ARROW_BUILD_BENCHMARKS`, though noting it is set to `OFF` in GLib MSVC workflow.
Add VCPKG set up
Borrowed from the Glib workflow
Add `/EHsc` flag
* Add back `CMAKE_CXX_STANDARD: "17"`
Remove `CMAKE_CXX_STANDARD` 17
* reason: gtest can't be used with C++17. Arrow project doesn't support C++ 17 yet.
Extend run-time to 2hr
windows-mingw also has timeout of 2hr
Empty commit to trigger CI
Specify `VCPKG_BINARY_SOURCES` and `VCPKG_DEFAULT_TRIPLET`
Specify VCPKG_TARGET_TRIPLET as x64 windows
Set ARROW_DEPENDENCY_SOURCE to VCPKG
To make it easier to manage dependencies
Enable static build on MSVC
`ARROW_BUILD_BENCHMARKS` prevents Flight from being built
Remove `ARROW_BOOST_USE_SHARED`
Having static vs. shared issue
Enable Flight & Flight SQL for ODBC
Enable ODBC build on MSVC CI
Enable regular ctest tests
Remove undef items
Add concurrency and permissions to odbc yml
Create cpp_odbc.yml
Fix architecture in CI
alinaliBQ
force-pushed
the
odbc-standalone-ci
branch
from
December 1, 2025 19:36
ee0aac8 to
2f4cf1c
Compare
justing-bq
approved these changes
Dec 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI for building ODBC only on Windows, the new workflow is named
C++ ODBC / windows. It builds and registers the ODBC driver, but the tests are not enabled yet due toblocker 1) apache#48270 Support Unloading For Arrow Libraries Used by Flight SQL ODBC in MSVC
blocker 2) apache#48269 Enable Flight & Flight SQL tests in MSVC CI