-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-49268: [C++][FlightRPC] Fix ODBC tests for MacOS #49267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,23 +17,20 @@ | |
|
|
||
| #include "arrow/flight/sql/odbc/odbc_impl/system_dsn.h" | ||
|
|
||
| #include "arrow/flight/sql/odbc/odbc_impl/config/configuration.h" | ||
| #include "arrow/flight/sql/odbc/odbc_impl/flight_sql_connection.h" | ||
| #include "arrow/flight/sql/odbc/odbc_impl/ui/dsn_configuration_window.h" | ||
| #include "arrow/flight/sql/odbc/odbc_impl/ui/window.h" | ||
| #include "arrow/flight/sql/odbc/odbc_impl/util.h" | ||
| #include "arrow/result.h" | ||
| #include "arrow/util/utf8.h" | ||
|
|
||
| #include <odbcinst.h> | ||
| #include <boost/algorithm/string/predicate.hpp> | ||
| #include <sstream> | ||
|
|
||
| namespace arrow::flight::sql::odbc { | ||
|
|
||
| using config::Configuration; | ||
|
|
||
| void PostError(DWORD error_code, LPCWSTR error_msg) { | ||
| void PostError(DWORD error_code, LPWSTR error_msg) { | ||
| #if defined _WIN32 | ||
| MessageBox(NULL, error_msg, L"Error!", MB_ICONEXCLAMATION | MB_OK); | ||
| #endif // _WIN32 | ||
| SQLPostInstallerError(error_code, error_msg); | ||
| } | ||
|
|
||
|
|
@@ -42,7 +39,7 @@ void PostArrowUtilError(arrow::Status error_status) { | |
| std::wstring werror_msg = arrow::util::UTF8ToWideString(error_msg).ValueOr( | ||
| L"Error during utf8 to wide string conversion"); | ||
|
|
||
| PostError(ODBC_ERROR_GENERAL_ERR, werror_msg.c_str()); | ||
| PostError(ODBC_ERROR_GENERAL_ERR, const_cast<LPWSTR>(werror_msg.c_str())); | ||
| } | ||
|
|
||
| void PostLastInstallerError() { | ||
|
|
@@ -55,7 +52,7 @@ void PostLastInstallerError() { | |
| buf << L"Message: \"" << msg << L"\", Code: " << code; | ||
| std::wstring error_msg = buf.str(); | ||
|
|
||
| PostError(code, error_msg.c_str()); | ||
| PostError(code, const_cast<LPWSTR>(error_msg.c_str())); | ||
| } | ||
|
Comment on lines
30
to
56
|
||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
system_dsn.ccusesboost::iequalsinRegisterDsn(...)but the Boost predicate header is no longer included after this change, which will break compilation. Add the appropriate Boost include (e.g., the predicate header) in this file or in a header that guarantees it for all build targets.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.