Skip to content
Draft
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: 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 @@ -207,6 +208,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: 1 addition & 1 deletion cpp/cmake_modules/DefineOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ endmacro()

macro(resolve_option_dependencies)
# Arrow Flight SQL ODBC is available only for Windows for now.
if(NOT MSVC_TOOLCHAIN)
if(NOT WIN32)
set(ARROW_FLIGHT_SQL_ODBC OFF)
endif()
if(MSVC_TOOLCHAIN)
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 @@ -1269,7 +1269,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()
if(ARROW_ENABLE_THREADING)
Expand Down
5 changes: 2 additions & 3 deletions cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ add_subdirectory(odbcabstraction)

arrow_install_all_headers("arrow/flight/sql/odbc")

set(ARROW_FLIGHT_SQL_ODBC_SRCS entry_points.cc odbc_api.cc)
# Compile entry_points.cc before odbc_api.cc due to conflict from sql.h and flight/types.h
set(ARROW_FLIGHT_SQL_ODBC_SRCS odbc_api.cc entry_points.cc)

if(WIN32)
list(APPEND ARROW_FLIGHT_SQL_ODBC_SRCS odbc.def)
Expand All @@ -55,8 +56,6 @@ add_arrow_lib(arrow_flight_sql_odbc
${ARROW_FLIGHT_SQL_ODBC_SRCS}
DEPENDENCIES
arrow_flight_sql
DEFINITIONS
FMT_HEADER_ONLY
SHARED_LINK_FLAGS
${ARROW_VERSION_SCRIPT_FLAGS} # Defined in cpp/arrow/CMakeLists.txt
SHARED_LINK_LIBS
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_str_len, str_len_buffer.data());

std::basic_stringstream<uint8_t> ss;
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
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// specific language governing permissions and limitations
// under the License.

#pragma once

#include <optional>
#include "arrow/array/builder_binary.h"
#include "arrow/array/builder_primitive.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
// specific language governing permissions and limitations
// under the License.

#pragma once

#include <optional>
#include "arrow/array/builder_binary.h"
#include "arrow/array/builder_primitive.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

# include <bcrypt.h>
# include <cryptuiapi.h>
# include <prsht.h>

# include <tchar.h>
# include <string>
Expand Down
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* create_struct = 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
1 change: 1 addition & 0 deletions cpp/src/arrow/flight/sql/odbc/flight_sql/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/exceptions.h>
#include <arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/types.h>
#include <arrow/flight/types.h>
#include <boost/variant.hpp>
Comment on lines 22 to +23
Copy link
Contributor Author

Choose a reason for hiding this comment

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

boost::variant is an existing dependency of flightsql-odbc. Our plan is to replace it with std::variant in future PRs

#include <boost/xpressive/xpressive.hpp>
#include <codecvt>
#include <functional>
Expand Down
Loading