Skip to content

Commit ac9d721

Browse files
authored
GH-46465: [C++][FlightRPC] Refactor ODBC namespaces and file structure (#47703)
### Rationale for this change Closes #46465. ### What changes are included in this PR? Multiple `utils` files have been merged into a single `util.cc/h`. The project/subdirectory `flight_sql` has been renamed to `odbc_impl`. The project/subdirectory `odbcabstraction` is removed and its files have been moved to `odbc_impl`. Header files inside `include` directories have been relocated to the same directory as their implementation files. ### Are these changes tested? N/A ### Are there any user-facing changes? No * GitHub Issue: #46465 Authored-by: justing-bq <[email protected]> Signed-off-by: David Li <[email protected]>
1 parent 2c63d48 commit ac9d721

File tree

135 files changed

+3257
-4100
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

135 files changed

+3257
-4100
lines changed

cpp/src/arrow/flight/sql/odbc/CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ else()
3333
set(ODBCINST odbcinst)
3434
endif()
3535

36-
add_subdirectory(flight_sql)
37-
add_subdirectory(odbcabstraction)
36+
add_subdirectory(odbc_impl)
3837

3938
arrow_install_all_headers("arrow/flight/sql/odbc")
4039

@@ -70,7 +69,6 @@ add_arrow_lib(arrow_flight_sql_odbc
7069
SHARED_PRIVATE_LINK_LIBS
7170
ODBC::ODBC
7271
${ODBCINST}
73-
odbcabstraction
7472
arrow_odbc_spi_impl)
7573

7674
foreach(LIB_TARGET ${ARROW_FLIGHT_SQL_ODBC_LIBRARIES})

cpp/src/arrow/flight/sql/odbc/entry_points.cc

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
// under the License.
1717

1818
// platform.h includes windows.h, so it needs to be included first
19-
#include "arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/platform.h"
19+
#include "arrow/flight/sql/odbc/odbc_impl/platform.h"
2020

2121
#include <sql.h>
2222
#include <sqlext.h>
@@ -26,10 +26,10 @@
2626
#include "arrow/flight/sql/odbc/odbc_api_internal.h"
2727
#include "arrow/flight/sql/odbc/visibility.h"
2828

29-
#include "arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/odbc_impl/odbc_connection.h"
30-
#include "arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/odbc_impl/odbc_descriptor.h"
31-
#include "arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/odbc_impl/odbc_environment.h"
32-
#include "arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/odbc_impl/odbc_statement.h"
29+
#include "arrow/flight/sql/odbc/odbc_impl/odbc_connection.h"
30+
#include "arrow/flight/sql/odbc/odbc_impl/odbc_descriptor.h"
31+
#include "arrow/flight/sql/odbc/odbc_impl/odbc_environment.h"
32+
#include "arrow/flight/sql/odbc/odbc_impl/odbc_statement.h"
3333

3434
#include "arrow/util/logging.h"
3535

@@ -191,8 +191,8 @@ SQLRETURN SQL_API SQLBindCol(SQLHSTMT stmt, SQLUSMALLINT record_number,
191191
SQLRETURN SQL_API SQLCancel(SQLHSTMT stmt) {
192192
ARROW_LOG(DEBUG) << "SQLCancel called with stmt: " << stmt;
193193
return ODBC::ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() {
194-
throw driver::odbcabstraction::DriverException("SQLCancel is not implemented",
195-
"IM001");
194+
throw arrow::flight::sql::odbc::DriverException("SQLCancel is not implemented",
195+
"IM001");
196196
return SQL_ERROR;
197197
});
198198
}
@@ -252,8 +252,8 @@ SQLRETURN SQL_API SQLForeignKeys(
252252
<< ", fk_table_name: " << static_cast<const void*>(fk_table_name)
253253
<< ", fk_table_name_length: " << fk_table_name_length;
254254
return ODBC::ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() {
255-
throw driver::odbcabstraction::DriverException("SQLForeignKeysW is not implemented",
256-
"IM001");
255+
throw arrow::flight::sql::odbc::DriverException("SQLForeignKeysW is not implemented",
256+
"IM001");
257257
return SQL_ERROR;
258258
});
259259
}
@@ -295,8 +295,8 @@ SQLRETURN SQL_API SQLPrimaryKeys(SQLHSTMT stmt, SQLWCHAR* catalog_name,
295295
<< ", table_name: " << static_cast<const void*>(table_name)
296296
<< ", table_name_length: " << table_name_length;
297297
return ODBC::ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() {
298-
throw driver::odbcabstraction::DriverException("SQLPrimaryKeysW is not implemented",
299-
"IM001");
298+
throw arrow::flight::sql::odbc::DriverException("SQLPrimaryKeysW is not implemented",
299+
"IM001");
300300
return SQL_ERROR;
301301
});
302302
}

cpp/src/arrow/flight/sql/odbc/flight_sql/accessors/main.h

Lines changed: 0 additions & 27 deletions
This file was deleted.

cpp/src/arrow/flight/sql/odbc/flight_sql/accessors/primitive_array_accessor.cc

Lines changed: 0 additions & 78 deletions
This file was deleted.

cpp/src/arrow/flight/sql/odbc/flight_sql/accessors/time_array_accessor.cc

Lines changed: 0 additions & 148 deletions
This file was deleted.

0 commit comments

Comments
 (0)