Skip to content

Commit dfe4dc9

Browse files
committed
Address comments
1 parent 5c6228c commit dfe4dc9

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

cpp/src/arrow/flight/sql/odbc/odbc_impl/system_dsn.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "arrow/result.h"
2121
#include "arrow/util/utf8.h"
2222

23+
#include <boost/algorithm/string/predicate.hpp>
2324
#include <sstream>
2425

2526
namespace arrow::flight::sql::odbc {
@@ -38,7 +39,7 @@ void PostArrowUtilError(arrow::Status error_status) {
3839
std::wstring werror_msg = arrow::util::UTF8ToWideString(error_msg).ValueOr(
3940
L"Error during utf8 to wide string conversion");
4041

41-
PostError(ODBC_ERROR_GENERAL_ERR, (LPWSTR)werror_msg.c_str());
42+
PostError(ODBC_ERROR_GENERAL_ERR, const_cast<LPWSTR>(werror_msg.c_str()));
4243
}
4344

4445
void PostLastInstallerError() {
@@ -51,7 +52,7 @@ void PostLastInstallerError() {
5152
buf << L"Message: \"" << msg << L"\", Code: " << code;
5253
std::wstring error_msg = buf.str();
5354

54-
PostError(code, (LPWSTR)error_msg.c_str());
55+
PostError(code, const_cast<LPWSTR>(error_msg.c_str()));
5556
}
5657

5758
/**

cpp/src/arrow/flight/sql/odbc/odbc_impl/win_system_dsn.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ BOOL INSTAPI ConfigDSNW(HWND hwnd_parent, WORD req, LPCWSTR wdriver,
144144
std::wstring werror_msg =
145145
arrow::util::UTF8ToWideString(error_msg).ValueOr(L"Error during DSN load");
146146

147-
PostError(err.GetNativeError(), (LPWSTR)werror_msg.c_str());
147+
PostError(err.GetNativeError(), const_cast<LPWSTR>(werror_msg.c_str()));
148148
return FALSE;
149149
}
150150

cpp/src/arrow/flight/sql/odbc/tests/type_info_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1769,7 +1769,7 @@ TEST_F(TypeInfoOdbcV2MockTest, TestSQLGetTypeInfoTimeODBCVer2) {
17691769

17701770
TEST_F(TypeInfoOdbcV2MockTest, TestSQLGetTypeInfoSQLTypeTime) {
17711771
#ifdef __APPLE__
1772-
ASSERT_EQ(SQL_SUCCESS, SQLGetTypeInfo(stmt, SQL_TYPE_DATE));
1772+
ASSERT_EQ(SQL_SUCCESS, SQLGetTypeInfo(stmt, SQL_TYPE_TIME));
17731773
#else
17741774
// Pass ODBC Ver 3 data type
17751775
ASSERT_EQ(SQL_ERROR, SQLGetTypeInfo(stmt, SQL_TYPE_TIME));

0 commit comments

Comments
 (0)