From 4b13ca4640d17fefc6289d30277c434bdcc7faa7 Mon Sep 17 00:00:00 2001 From: vanshaj2023 Date: Sat, 23 May 2026 00:30:38 +0530 Subject: [PATCH 1/9] GH-49482: fix inconsistent SQLGetInfo values in global connection --- .../sql/odbc/odbc_impl/get_info_cache.cc | 41 ++++++++++--------- .../sql/odbc/tests/connection_info_test.cc | 27 ++---------- 2 files changed, 24 insertions(+), 44 deletions(-) diff --git a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc index 6923d7fafbe4..5654a4e5aa01 100644 --- a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc +++ b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc @@ -395,25 +395,21 @@ bool GetInfoCache::LoadInfoFromServer() { // Unused by ODBC. break; case SqlInfoOptions::SQL_DDL_SCHEMA: { - // GH-49500 TODO: use scalar bool to determine `SQL_CREATE_SCHEMA` and - // `SQL_DROP_SCHEMA` values - - // Note: this is a bitmask and we can't describe cascade or restrict - // flags. - info_[SQL_DROP_SCHEMA] = static_cast(SQL_DS_DROP_SCHEMA); - - // Note: this is a bitmask and we can't describe authorization or - // collation - info_[SQL_CREATE_SCHEMA] = static_cast(SQL_CS_CREATE_SCHEMA); + bool supported = + reinterpret_cast(scalar->child_value().get())->value; + info_[SQL_DROP_SCHEMA] = + static_cast(supported ? SQL_DS_DROP_SCHEMA : 0); + info_[SQL_CREATE_SCHEMA] = + static_cast(supported ? SQL_CS_CREATE_SCHEMA : 0); break; } case SqlInfoOptions::SQL_DDL_TABLE: { - // GH-49500 TODO: use scalar bool to determine `SQL_CREATE_TABLE` and - // `SQL_DROP_TABLE` values - - // This is a bitmask and we cannot describe all clauses. - info_[SQL_CREATE_TABLE] = static_cast(SQL_CT_CREATE_TABLE); - info_[SQL_DROP_TABLE] = static_cast(SQL_DT_DROP_TABLE); + bool supported = + reinterpret_cast(scalar->child_value().get())->value; + info_[SQL_CREATE_TABLE] = + static_cast(supported ? SQL_CT_CREATE_TABLE : 0); + info_[SQL_DROP_TABLE] = + static_cast(supported ? SQL_DT_DROP_TABLE : 0); break; } case SqlInfoOptions::SQL_ALL_TABLES_ARE_SELECTABLE: { @@ -475,10 +471,15 @@ bool GetInfoCache::LoadInfoFromServer() { break; } case SqlInfoOptions::SQL_CATALOG_AT_START: { - info_[SQL_CATALOG_LOCATION] = static_cast( - reinterpret_cast(scalar->child_value().get())->value - ? SQL_CL_START - : SQL_CL_END); + // Only use this as a fallback if ARROW_SQL_CATALOG_TERM has not already + // set SQL_CATALOG_LOCATION (to avoid conflicting writes depending on + // response key ordering). + SetDefaultIfMissing( + info_, SQL_CATALOG_LOCATION, + static_cast( + reinterpret_cast(scalar->child_value().get())->value + ? SQL_CL_START + : SQL_CL_END)); break; } case SqlInfoOptions::SQL_SELECT_FOR_UPDATE_SUPPORTED: diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc index 232aa985c7e3..c152327f0aaf 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc +++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc @@ -622,18 +622,11 @@ TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoAlterTable) { EXPECT_EQ(static_cast(0), value); } -TYPED_TEST(ConnectionInfoHandleTest, TestSQLGetInfoCatalogLocation) { - // GH-49482 TODO: resolve inconsitent return value for SQL_CATALOG_LOCATION and change - // test type to `ConnectionInfoTest` - this->ConnectWithString(this->GetConnectionString(), this->conn); - +TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoCatalogLocation) { SQLUSMALLINT value; GetInfo(this->conn, SQL_CATALOG_LOCATION, &value); EXPECT_EQ(static_cast(0), value); - - EXPECT_EQ(SQL_SUCCESS, SQLDisconnect(this->conn)) - << GetOdbcErrorMessage(SQL_HANDLE_DBC, this->conn); } TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoCatalogName) { @@ -758,32 +751,18 @@ TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropDomain) { EXPECT_EQ(static_cast(0), value); } -TYPED_TEST(ConnectionInfoHandleTest, TestSQLGetInfoDropSchema) { - // GH-49482 TODO: resolve inconsitent return value for SQL_DROP_SCHEMA and change test - // type to `ConnectionInfoTest` - this->ConnectWithString(this->GetConnectionString(), this->conn); - +TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_SCHEMA, &value); EXPECT_EQ(static_cast(0), value); - - EXPECT_EQ(SQL_SUCCESS, SQLDisconnect(this->conn)) - << GetOdbcErrorMessage(SQL_HANDLE_DBC, this->conn); } -TYPED_TEST(ConnectionInfoHandleTest, TestSQLGetInfoDropTable) { - // GH-49482 TODO: resolve inconsitent return value for SQL_DROP_TABLE and change test - // type to `ConnectionInfoTest` - this->ConnectWithString(this->GetConnectionString(), this->conn); - +TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropTable) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_TABLE, &value); EXPECT_EQ(static_cast(0), value); - - EXPECT_EQ(SQL_SUCCESS, SQLDisconnect(this->conn)) - << GetOdbcErrorMessage(SQL_HANDLE_DBC, this->conn); } TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropTranslation) { From 1864e212eaa2083d55913d763b79bfd00375266d Mon Sep 17 00:00:00 2001 From: vanshaj2023 Date: Mon, 25 May 2026 20:20:08 +0530 Subject: [PATCH 2/9] address review: use checked_cast and fix test expectations for DDL info --- .../sql/odbc/odbc_impl/get_info_cache.cc | 27 ++++++++++--------- .../sql/odbc/tests/connection_info_test.cc | 8 +++--- 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc index 5654a4e5aa01..944045b2aa46 100644 --- a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc +++ b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc @@ -25,6 +25,7 @@ #include "arrow/flight/sql/odbc/odbc_impl/exceptions.h" #include "arrow/scalar.h" #include "arrow/type_fwd.h" +#include "arrow/util/checked_cast.h" #include "arrow/flight/sql/odbc/odbc_impl/flight_sql_stream_chunk_buffer.h" #include "arrow/flight/sql/odbc/odbc_impl/scalar_function_reporter.h" @@ -190,7 +191,7 @@ inline int64_t ScalarToInt64(UnionScalar* scalar) { } inline std::string ScalarToBoolString(UnionScalar* scalar) { - return reinterpret_cast(scalar->child_value().get())->value ? "Y" : "N"; + return checked_cast(scalar->child_value().get())->value ? "Y" : "N"; } inline void SetDefaultIfMissing(std::unordered_map& cache, @@ -396,7 +397,7 @@ bool GetInfoCache::LoadInfoFromServer() { break; case SqlInfoOptions::SQL_DDL_SCHEMA: { bool supported = - reinterpret_cast(scalar->child_value().get())->value; + checked_cast(scalar->child_value().get())->value; info_[SQL_DROP_SCHEMA] = static_cast(supported ? SQL_DS_DROP_SCHEMA : 0); info_[SQL_CREATE_SCHEMA] = @@ -405,7 +406,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_DDL_TABLE: { bool supported = - reinterpret_cast(scalar->child_value().get())->value; + checked_cast(scalar->child_value().get())->value; info_[SQL_CREATE_TABLE] = static_cast(supported ? SQL_CT_CREATE_TABLE : 0); info_[SQL_DROP_TABLE] = @@ -422,7 +423,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_NULL_PLUS_NULL_IS_NULL: { info_[SQL_CONCAT_NULL_BEHAVIOR] = static_cast( - reinterpret_cast(scalar->child_value().get())->value + checked_cast(scalar->child_value().get())->value ? SQL_CB_NULL : SQL_CB_NON_NULL); break; @@ -432,7 +433,7 @@ bool GetInfoCache::LoadInfoFromServer() { // SQL_SUPPORTS_DIFFERENT_TABLE_CORRELATION_NAMES since we need both // properties to determine the value for SQL_CORRELATION_NAME. supports_correlation_name = - reinterpret_cast(scalar->child_value().get())->value; + checked_cast(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_SUPPORTS_DIFFERENT_TABLE_CORRELATION_NAMES: { @@ -440,7 +441,7 @@ bool GetInfoCache::LoadInfoFromServer() { // SQL_SUPPORTS_DIFFERENT_TABLE_CORRELATION_NAMES since we need both // properties to determine the value for SQL_CORRELATION_NAME. requires_different_correlation_name = - reinterpret_cast(scalar->child_value().get())->value; + checked_cast(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_SUPPORTS_EXPRESSIONS_IN_ORDER_BY: { @@ -450,7 +451,7 @@ bool GetInfoCache::LoadInfoFromServer() { case SqlInfoOptions::SQL_SUPPORTS_ORDER_BY_UNRELATED: { // Note: this is the negation of the Flight SQL property. info_[SQL_ORDER_BY_COLUMNS_IN_SELECT] = - reinterpret_cast(scalar->child_value().get())->value + checked_cast(scalar->child_value().get())->value ? "N" : "Y"; break; @@ -461,7 +462,7 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_SUPPORTS_NON_NULLABLE_COLUMNS: { info_[SQL_NON_NULLABLE_COLUMNS] = static_cast( - reinterpret_cast(scalar->child_value().get())->value + checked_cast(scalar->child_value().get())->value ? SQL_NNC_NON_NULL : SQL_NNC_NULL); break; @@ -477,7 +478,7 @@ bool GetInfoCache::LoadInfoFromServer() { SetDefaultIfMissing( info_, SQL_CATALOG_LOCATION, static_cast( - reinterpret_cast(scalar->child_value().get())->value + checked_cast(scalar->child_value().get())->value ? SQL_CL_START : SQL_CL_END)); break; @@ -495,22 +496,22 @@ bool GetInfoCache::LoadInfoFromServer() { } case SqlInfoOptions::SQL_TRANSACTIONS_SUPPORTED: { transactions_supported = - reinterpret_cast(scalar->child_value().get())->value; + checked_cast(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_DATA_DEFINITION_CAUSES_TRANSACTION_COMMIT: { transaction_ddl_commit = - reinterpret_cast(scalar->child_value().get())->value; + checked_cast(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_DATA_DEFINITIONS_IN_TRANSACTIONS_IGNORED: { transaction_ddl_ignore = - reinterpret_cast(scalar->child_value().get())->value; + checked_cast(scalar->child_value().get())->value; break; } case SqlInfoOptions::SQL_BATCH_UPDATES_SUPPORTED: { info_[SQL_BATCH_SUPPORT] = static_cast( - reinterpret_cast(scalar->child_value().get())->value + checked_cast(scalar->child_value().get())->value ? SQL_BS_ROW_COUNT_EXPLICIT : 0); break; diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc index c152327f0aaf..8f3159acd978 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc +++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc @@ -751,18 +751,18 @@ TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropDomain) { EXPECT_EQ(static_cast(0), value); } -TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropSchema) { +TEST_F(ConnectionInfoMockTest, TestSQLGetInfoDropSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_SCHEMA, &value); - EXPECT_EQ(static_cast(0), value); + EXPECT_EQ(static_cast(SQL_DS_DROP_SCHEMA), value); } -TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropTable) { +TEST_F(ConnectionInfoMockTest, TestSQLGetInfoDropTable) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_TABLE, &value); - EXPECT_EQ(static_cast(0), value); + EXPECT_EQ(static_cast(SQL_DT_DROP_TABLE), value); } TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropTranslation) { From 7a68a254e3f1feec98ebbbafcf84ee083b8ebc5b Mon Sep 17 00:00:00 2001 From: vanshaj2023 Date: Tue, 26 May 2026 17:33:56 +0530 Subject: [PATCH 3/9] address review: qualify checked_cast and use TYPED_TEST for DDL tests --- cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc | 3 +++ cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc index 944045b2aa46..7fede0e22d5a 100644 --- a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc +++ b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc @@ -77,6 +77,9 @@ #define ARROW_CONVERT_VARCHAR 19 namespace arrow::flight::sql::odbc { + +using arrow::internal::checked_cast; + namespace { // Return the corresponding field in SQLGetInfo's SQL_CONVERT_* field // types for the given Arrow SqlConvert enum value. diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc index 8f3159acd978..00c05095605d 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc +++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc @@ -751,14 +751,14 @@ TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropDomain) { EXPECT_EQ(static_cast(0), value); } -TEST_F(ConnectionInfoMockTest, TestSQLGetInfoDropSchema) { +TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_SCHEMA, &value); EXPECT_EQ(static_cast(SQL_DS_DROP_SCHEMA), value); } -TEST_F(ConnectionInfoMockTest, TestSQLGetInfoDropTable) { +TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropTable) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_TABLE, &value); From f312558992db498ec3f0545c641f86084b997387 Mon Sep 17 00:00:00 2001 From: vanshaj2023 Date: Wed, 5 Aug 2026 02:09:29 +0530 Subject: [PATCH 4/9] GH-49482: remove premature SQL_DROP_SCHEMA/TABLE cache defaults, fix DDL test expectations Constructor pre-seeded these keys with 0, which short-circuited the lazy GetInfo load-on-miss check and caused order-dependent stale values. Also fixes DropSchema/CreateSchema mock expectations (SQLite has no schema DDL) and splits DropSchema into mock/remote since support differs. --- .../flight/sql/odbc/odbc_impl/get_info_cache.cc | 2 -- .../flight/sql/odbc/tests/connection_info_test.cc | 14 ++++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc index 7fede0e22d5a..e25e85e5612d 100644 --- a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc +++ b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc @@ -250,8 +250,6 @@ GetInfoCache::GetInfoCache(FlightClientOptions& client_options, info_[SQL_DROP_CHARACTER_SET] = static_cast(0); info_[SQL_DROP_COLLATION] = static_cast(0); info_[SQL_DROP_DOMAIN] = static_cast(0); - info_[SQL_DROP_SCHEMA] = static_cast(0); - info_[SQL_DROP_TABLE] = static_cast(0); info_[SQL_DROP_TRANSLATION] = static_cast(0); info_[SQL_DROP_VIEW] = static_cast(0); info_[SQL_MAX_IDENTIFIER_LEN] = static_cast(65535); // arbitrary diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc index 00c05095605d..d976a289ef8b 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc +++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc @@ -30,6 +30,7 @@ template class ConnectionInfoTest : public T {}; class ConnectionInfoMockTest : public FlightSQLODBCMockTestBase {}; +class ConnectionInfoRemoteTest : public FlightSQLODBCRemoteTestBase {}; using TestTypes = ::testing::Types; TYPED_TEST_SUITE(ConnectionInfoTest, TestTypes); @@ -699,7 +700,8 @@ TEST_F(ConnectionInfoMockTest, TestSQLGetInfoCreateSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_CREATE_SCHEMA, &value); - EXPECT_EQ(static_cast(1), value); + // SQLite (the mock backend) does not support schema DDL. + EXPECT_EQ(static_cast(0), value); } TEST_F(ConnectionInfoMockTest, TestSQLGetInfoCreateTable) { @@ -751,7 +753,15 @@ TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropDomain) { EXPECT_EQ(static_cast(0), value); } -TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropSchema) { +TEST_F(ConnectionInfoMockTest, TestSQLGetInfoDropSchema) { + SQLUINTEGER value; + GetInfo(this->conn, SQL_DROP_SCHEMA, &value); + + // SQLite (the mock backend) does not support schema DDL. + EXPECT_EQ(static_cast(0), value); +} + +TEST_F(ConnectionInfoRemoteTest, TestSQLGetInfoDropSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_SCHEMA, &value); From de092eda8fa09b638b1668674b2a4fe429b345f2 Mon Sep 17 00:00:00 2001 From: vanshaj2023 Date: Thu, 6 Aug 2026 11:53:55 +0530 Subject: [PATCH 5/9] fix clang-format and correct DropTable/DropSchema remote expectations Dremio does not report table or schema DDL support any more than the SQLite mock does, so split TestSQLGetInfoDropTable per backend too. --- .../flight/sql/odbc/odbc_impl/get_info_cache.cc | 5 ++--- .../flight/sql/odbc/tests/connection_info_test.cc | 13 +++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc index e25e85e5612d..1d9e9ee4c183 100644 --- a/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc +++ b/cpp/src/arrow/flight/sql/odbc/odbc_impl/get_info_cache.cc @@ -452,9 +452,8 @@ bool GetInfoCache::LoadInfoFromServer() { case SqlInfoOptions::SQL_SUPPORTS_ORDER_BY_UNRELATED: { // Note: this is the negation of the Flight SQL property. info_[SQL_ORDER_BY_COLUMNS_IN_SELECT] = - checked_cast(scalar->child_value().get())->value - ? "N" - : "Y"; + checked_cast(scalar->child_value().get())->value ? "N" + : "Y"; break; } case SqlInfoOptions::SQL_SUPPORTS_LIKE_ESCAPE_CLAUSE: { diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc index d976a289ef8b..fd4433d7c2ff 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc +++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc @@ -765,16 +765,25 @@ TEST_F(ConnectionInfoRemoteTest, TestSQLGetInfoDropSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_SCHEMA, &value); - EXPECT_EQ(static_cast(SQL_DS_DROP_SCHEMA), value); + // The Dremio backend does not report schema DDL support either. + EXPECT_EQ(static_cast(0), value); } -TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropTable) { +TEST_F(ConnectionInfoMockTest, TestSQLGetInfoDropTable) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_TABLE, &value); EXPECT_EQ(static_cast(SQL_DT_DROP_TABLE), value); } +TEST_F(ConnectionInfoRemoteTest, TestSQLGetInfoDropTable) { + SQLUINTEGER value; + GetInfo(this->conn, SQL_DROP_TABLE, &value); + + // The Dremio backend does not report table DDL support. + EXPECT_EQ(static_cast(0), value); +} + TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropTranslation) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_TRANSLATION, &value); From cfb3d102f3be9d9699376cd8c70f178c9cb5d724 Mon Sep 17 00:00:00 2001 From: Kumar Vanshaj Date: Thu, 6 Aug 2026 22:52:40 +0530 Subject: [PATCH 6/9] Update cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc Co-authored-by: Alina (Xi) Li <96995091+alinaliBQ@users.noreply.github.com> --- cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc index fd4433d7c2ff..2eff401845b9 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc +++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc @@ -753,7 +753,7 @@ TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropDomain) { EXPECT_EQ(static_cast(0), value); } -TEST_F(ConnectionInfoMockTest, TestSQLGetInfoDropSchema) { +TEST_F(ConnectionInfoHandleTest, TestSQLGetInfoDropSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_SCHEMA, &value); From cbb6d278d964545eab9daa42eaf306e16b56e418 Mon Sep 17 00:00:00 2001 From: Kumar Vanshaj Date: Thu, 6 Aug 2026 22:55:52 +0530 Subject: [PATCH 7/9] Update cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc Co-authored-by: Alina (Xi) Li <96995091+alinaliBQ@users.noreply.github.com> --- cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc index 2eff401845b9..5ae82e01537f 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc +++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc @@ -753,7 +753,7 @@ TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropDomain) { EXPECT_EQ(static_cast(0), value); } -TEST_F(ConnectionInfoHandleTest, TestSQLGetInfoDropSchema) { +TYPED_TEST(ConnectionInfoHandleTest, TestSQLGetInfoDropSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_SCHEMA, &value); From 870e231a783745bcd591736b15fbc254e785a51a Mon Sep 17 00:00:00 2001 From: vanshaj2023 Date: Thu, 6 Aug 2026 23:01:40 +0530 Subject: [PATCH 8/9] address review: remove duplicate DropSchema remote test, fix comment --- .../flight/sql/odbc/tests/connection_info_test.cc | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc index 5ae82e01537f..5ca70b4ca9aa 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc +++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc @@ -757,15 +757,7 @@ TYPED_TEST(ConnectionInfoHandleTest, TestSQLGetInfoDropSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_SCHEMA, &value); - // SQLite (the mock backend) does not support schema DDL. - EXPECT_EQ(static_cast(0), value); -} - -TEST_F(ConnectionInfoRemoteTest, TestSQLGetInfoDropSchema) { - SQLUINTEGER value; - GetInfo(this->conn, SQL_DROP_SCHEMA, &value); - - // The Dremio backend does not report schema DDL support either. + // Neither the SQLite mock backend nor the Dremio backend support schema DDL. EXPECT_EQ(static_cast(0), value); } From 9e47bdffc8d1de57876b86c0412a11c75284dd9d Mon Sep 17 00:00:00 2001 From: Kumar Vanshaj Date: Fri, 7 Aug 2026 22:22:26 +0530 Subject: [PATCH 9/9] Update cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc Co-authored-by: Alina (Xi) Li <96995091+alinaliBQ@users.noreply.github.com> --- cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc index 5ca70b4ca9aa..ff4abc59fa1d 100644 --- a/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc +++ b/cpp/src/arrow/flight/sql/odbc/tests/connection_info_test.cc @@ -753,7 +753,7 @@ TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropDomain) { EXPECT_EQ(static_cast(0), value); } -TYPED_TEST(ConnectionInfoHandleTest, TestSQLGetInfoDropSchema) { +TYPED_TEST(ConnectionInfoTest, TestSQLGetInfoDropSchema) { SQLUINTEGER value; GetInfo(this->conn, SQL_DROP_SCHEMA, &value);