Skip to content

Commit 549d4c2

Browse files
committed
Address review feedback
1 parent 3439e98 commit 549d4c2

4 files changed

Lines changed: 4 additions & 7 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ TYPED_TEST(ConnectionAttributeTest, TestSQLSetConnectAttrTraceDMOnly) {
127127
TYPED_TEST(ConnectionAttributePreConnectTest, TestSQLSetConnectAttrTracefileDMOnly) {
128128
// Verify DM-only attribute is handled by Driver Manager
129129

130-
// Use placeholder value as we want the call to fail, or else
131-
// the driver manager will produce a trace file.
130+
// Use placeholder value to avoid the driver manager from producing a trace file.
132131
std::wstring trace_file = L"invalid/file/path";
133132
std::vector<SQLWCHAR> trace_file0(trace_file.begin(), trace_file.end());
134133

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,9 @@ TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoOdbcVer) {
339339
EXPECT_EQ(std::wstring(L"03.52.0000"), result);
340340
#elif defined(__linux__)
341341
EXPECT_EQ(std::wstring(L"03.52"), result);
342-
#else // WINDOWS
342+
#else // WINDOWS
343343
EXPECT_EQ(std::wstring(L"03.80.0000"), result);
344-
#endif // __APPLE__
344+
#endif
345345
}
346346

347347
TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoParamArrayRowCounts) {

cpp/src/arrow/flight/sql/odbc/tests/odbc_test_suite.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ bool CompareConnPropertyMap(Connection::ConnPropertyMap map1,
246246
/// Get error message from ODBC driver using SQLGetDiagRec
247247
std::string GetOdbcErrorMessage(SQLSMALLINT handle_type, SQLHANDLE handle);
248248

249-
static constexpr std::string_view kErrorState00000 = "00000";
250249
static constexpr std::string_view kErrorState01004 = "01004";
251250
static constexpr std::string_view kErrorState01S02 = "01S02";
252251
static constexpr std::string_view kErrorState01S07 = "01S07";

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ TEST_F(StatementMockTest, TestSQLExecDirectVarbinaryTruncation) {
10431043
ASSERT_EQ(SQL_SUCCESS,
10441044
SQLGetData(this->stmt, 1, SQL_C_BINARY, &varbinary_val2[0], buf_len, &ind));
10451045

1046-
EXPECT_EQ(static_cast<char>('\xAB'), static_cast<char>(varbinary_val[0]));
1046+
EXPECT_EQ(static_cast<char>('\xAB'), static_cast<char>(varbinary_val2[0]));
10471047
EXPECT_EQ(1, ind);
10481048

10491049
// Attempt to fetch data 3rd time
@@ -1988,7 +1988,6 @@ TYPED_TEST(StatementTest, TestSQLMoreResultsInvalidFunctionSequence) {
19881988
// without executing any queries
19891989
#ifdef __linux__
19901990
ASSERT_EQ(SQL_NO_DATA, SQLMoreResults(this->stmt));
1991-
VerifyOdbcErrorState(SQL_HANDLE_STMT, this->stmt, kErrorState00000);
19921991
#else // Windows & Mac
19931992
ASSERT_EQ(SQL_ERROR, SQLMoreResults(this->stmt));
19941993
VerifyOdbcErrorState(SQL_HANDLE_STMT, this->stmt, kErrorStateHY010);

0 commit comments

Comments
 (0)