Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ jobs:

windows-mingw:
name: AMD64 Windows MinGW ${{ matrix.msystem_upper }} C++
runs-on: windows-2019
runs-on: windows-2022
if: ${{ !contains(github.event.pull_request.title, 'WIP') }}
# Build may take 1h+ without cache.
timeout-minutes: 120
Expand Down
2 changes: 2 additions & 0 deletions ci/scripts/cpp_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ if [ "${ARROW_ENABLE_THREADING:-ON}" = "OFF" ]; then
ARROW_AZURE=OFF
ARROW_FLIGHT=OFF
ARROW_FLIGHT_SQL=OFF
ARROW_FLIGHT_SQL_ODBC=OFF
ARROW_GCS=OFF
ARROW_JEMALLOC=OFF
ARROW_MIMALLOC=OFF
Expand Down Expand Up @@ -206,6 +207,7 @@ else
-DARROW_FILESYSTEM=${ARROW_FILESYSTEM:-ON} \
-DARROW_FLIGHT=${ARROW_FLIGHT:-OFF} \
-DARROW_FLIGHT_SQL=${ARROW_FLIGHT_SQL:-OFF} \
-DARROW_FLIGHT_SQL_ODBC=${ARROW_FLIGHT_SQL_ODBC:-OFF} \
-DARROW_FUZZING=${ARROW_FUZZING:-OFF} \
-DARROW_GANDIVA_PC_CXX_FLAGS=${ARROW_GANDIVA_PC_CXX_FLAGS:-} \
-DARROW_GANDIVA=${ARROW_GANDIVA:-OFF} \
Expand Down
2 changes: 2 additions & 0 deletions ci/scripts/cpp_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,8 @@ case "$(uname)" in
exclude_tests="${exclude_tests}|gandiva-precompiled-test"
exclude_tests="${exclude_tests}|gandiva-projector-test"
exclude_tests="${exclude_tests}|gandiva-utf8-test"
# TODO: Enable ODBC tests
exclude_tests="${exclude_tests}|arrow-connection-test"
ctest_options+=(--exclude-regex "${exclude_tests}")
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion cpp/cmake_modules/ThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ if(ARROW_USE_BOOST)
endif()
if(ARROW_BOOST_REQUIRE_LIBRARY)
set(ARROW_BOOST_COMPONENTS filesystem system)
if(ARROW_FLIGHT_SQL_ODBC AND MSVC)
if(ARROW_FLIGHT_SQL_ODBC)
list(APPEND ARROW_BOOST_COMPONENTS locale)
endif()
set(ARROW_BOOST_OPTIONAL_COMPONENTS process)
Expand Down
5 changes: 5 additions & 0 deletions cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,14 @@

add_custom_target(arrow_flight_sql_odbc)

# Ensure fmt is loaded as header only
add_compile_definitions(FMT_HEADER_ONLY)

if(WIN32)
if(MSVC_VERSION GREATER_EQUAL 1900)
set(ODBCINST legacy_stdio_definitions odbccp32 shlwapi)
elseif(MINGW)
set(ODBCINST odbccp32 shlwapi)
endif()
elseif(APPLE)
set(ODBCINST iodbcinst)
Expand Down
8 changes: 5 additions & 3 deletions cpp/src/arrow/flight/sql/odbc/flight_sql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,12 @@ if(WIN32)
win_system_dsn.cc)
endif()

target_link_libraries(arrow_odbc_spi_impl PUBLIC odbcabstraction arrow_flight_sql_shared)
target_link_libraries(arrow_odbc_spi_impl PUBLIC odbcabstraction arrow_flight_sql_shared
Boost::locale)

if(MSVC)
target_link_libraries(arrow_odbc_spi_impl PUBLIC Boost::locale)
# Link libraries on MINGW64 only
if(MINGW AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_link_libraries(arrow_odbc_spi_impl PUBLIC ${ODBCINST})
endif()

set_target_properties(arrow_odbc_spi_impl
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ TEST(StringArrayAccessor, Test_CDataType_WCHAR_Truncation) {
ColumnBinding binding(odbcabstraction::CDataType_WCHAR, 0, 0, buffer.data(), max_strlen,
strlen_buffer.data());

std::basic_stringstream<uint8_t> ss;
Copy link
Author

Choose a reason for hiding this comment

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

This variable ss was not used

int64_t value_offset = 0;

// Construct the whole string by concatenating smaller chunks from
Expand Down
1 change: 1 addition & 0 deletions cpp/src/arrow/flight/sql/odbc/flight_sql/address_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include <arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/platform.h>
#include <sys/types.h>
#include <cstdint>
#if !_WIN32
# include <netdb.h>
#endif
Expand Down
3 changes: 3 additions & 0 deletions cpp/src/arrow/flight/sql/odbc/flight_sql/system_trust_store.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
# include <wincrypt.h>

# include <bcrypt.h>

# include <prsht.h>

# include <cryptuiapi.h>

# include <tchar.h>
Expand Down
5 changes: 3 additions & 2 deletions cpp/src/arrow/flight/sql/odbc/flight_sql/ui/custom_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include <commctrl.h>

#include <wtypes.h>
#include <cassert>
#include <sstream>

#include "arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/exceptions.h"
Expand Down Expand Up @@ -53,7 +54,7 @@ LRESULT CALLBACK CustomWindow::WndProc(HWND hwnd, UINT msg, WPARAM wParam,

switch (msg) {
case WM_NCCREATE: {
_ASSERT(lParam != NULL);
assert(lParam != NULL);

CREATESTRUCT* createStruct = reinterpret_cast<CREATESTRUCT*>(lParam);

Expand All @@ -65,7 +66,7 @@ LRESULT CALLBACK CustomWindow::WndProc(HWND hwnd, UINT msg, WPARAM wParam,
}

case WM_CREATE: {
_ASSERT(window != NULL);
assert(window != NULL);

window->SetHandle(hwnd);

Expand Down
3 changes: 0 additions & 3 deletions cpp/src/arrow/flight/sql/odbc/odbcabstraction/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

include_directories(include)

# Ensure fmt is loaded as header only
add_compile_definitions(FMT_HEADER_ONLY)

add_library(odbcabstraction
include/odbcabstraction/calendar_utils.h
include/odbcabstraction/diagnostics.h
Expand Down
Loading