justing-bq commented on code in PR #47971:
URL: https://github.com/apache/arrow/pull/47971#discussion_r2505572184
##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/encoding_utils.h:
##########
@@ -40,15 +39,15 @@ using arrow::flight::sql::odbc::WcsToUtf8;
// Return the number of bytes required for the conversion.
template <typename CHAR_TYPE>
-inline size_t ConvertToSqlWChar(const std::string& str, SQLWCHAR* buffer,
+inline size_t ConvertToSqlWChar(const std::string_view& str, SQLWCHAR* buffer,
Review Comment:
Done.
##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/encoding_utils.h:
##########
@@ -86,7 +85,7 @@ inline size_t ConvertToSqlWChar(const std::string& str,
SQLWCHAR* buffer,
/// \param[in] msg_len Number of characters in wchar_msg
/// \return wchar_msg in std::string format
inline std::string SqlWcharToString(SQLWCHAR* wchar_msg, SQLINTEGER msg_len =
SQL_NTS) {
- if (msg_len == 0 || !wchar_msg || wchar_msg[0] == 0) {
+ if (!wchar_msg || wchar_msg[0] == 0 || msg_len == 0) {
Review Comment:
Done.
##########
cpp/src/arrow/flight/sql/odbc/odbc_impl/odbc_connection.h:
##########
@@ -75,8 +75,12 @@ class ODBCConnection : public ODBCHandle<ODBCConnection> {
inline bool IsOdbc2Connection() const { return is_2x_connection_; }
- /// @return the DSN or empty string if Driver was used.
- static std::string GetPropertiesFromConnString(
+ /// @return the DSN or an empty string if the DSN is not found or is found
after the
+ /// driver
+ static std::string GetDsnIfExists(const std::string& conn_str);
Review Comment:
Done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]