GH-47516: [C++][FlightRPC] Initial ODBC driver framework#47517
GH-47516: [C++][FlightRPC] Initial ODBC driver framework#47517kou merged 2 commits intoapache:mainfrom
Conversation
|
|
| add_custom_target(arrow_flight_sql_odbc) | ||
|
|
||
| # Ensure fmt is loaded as header only | ||
| add_compile_definitions(FMT_HEADER_ONLY) |
There was a problem hiding this comment.
Could you use target_compile_definitions() because add_compile_definitions()'s scope is directory? We should not use directory scope commands such as add_compile_definitions() and include_directories() for newly written code.
There was a problem hiding this comment.
Sure, I changed to use target_compile_definitions
| include(FetchContent) | ||
| fetchcontent_declare(spdlog | ||
| URL https://github.com/gabime/spdlog/archive/refs/tags/v1.15.3.zip | ||
| CONFIGURE_COMMAND | ||
| "" | ||
| BUILD_COMMAND | ||
| "") | ||
| fetchcontent_makeavailable(spdlog) |
There was a problem hiding this comment.
Can we use arrow/util/logging.h instead?
There was a problem hiding this comment.
Yes. Let me look into this
| SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT type, SQLHANDLE parent, SQLHANDLE* result) { | ||
| return SQL_INVALID_HANDLE; | ||
| } |
There was a problem hiding this comment.
Do we need both of the top-level SQLAllocHandle() and arrow::SQLAllocHandle()?
There was a problem hiding this comment.
Yes. In upcoming PRs, we plan to change it to look like:
SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT type, SQLHANDLE parent, SQLHANDLE* result) {
return arrow::flight::sql::odbc::SQLAllocHandle(...);
}
I have separate the actual implementation of SQLAllocHandle to make this PR smaller
alinaliBQ
left a comment
There was a problem hiding this comment.
Checked all comments. Let me look into replacing spdlogs with arrow/util/logging.h
| add_custom_target(arrow_flight_sql_odbc) | ||
|
|
||
| # Ensure fmt is loaded as header only | ||
| add_compile_definitions(FMT_HEADER_ONLY) |
There was a problem hiding this comment.
Sure, I changed to use target_compile_definitions
| include(FetchContent) | ||
| fetchcontent_declare(spdlog | ||
| URL https://github.com/gabime/spdlog/archive/refs/tags/v1.15.3.zip | ||
| CONFIGURE_COMMAND | ||
| "" | ||
| BUILD_COMMAND | ||
| "") | ||
| fetchcontent_makeavailable(spdlog) |
There was a problem hiding this comment.
Yes. Let me look into this
| SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT type, SQLHANDLE parent, SQLHANDLE* result) { | ||
| return SQL_INVALID_HANDLE; | ||
| } |
There was a problem hiding this comment.
Yes. In upcoming PRs, we plan to change it to look like:
SQLRETURN SQL_API SQLAllocHandle(SQLSMALLINT type, SQLHANDLE parent, SQLHANDLE* result) {
return arrow::flight::sql::odbc::SQLAllocHandle(...);
}
I have separate the actual implementation of SQLAllocHandle to make this PR smaller
f3f3c59 to
587050a
Compare
587050a to
677d1f1
Compare
Create odbc.def Remove SQLAllocHandle definitions In-progress - fix build errors In progress fix Remove unneeded code Fix build issues Continue build fixes Fix build issues Address review comments Follow-up changes Fix Lint issues
677d1f1 to
478dc97
Compare
| #ifdef _WIN32 | ||
| # include <windows.h> | ||
| #endif |
There was a problem hiding this comment.
Should we use #include "arrow/flight/sql/odbc/odbcabstraction/include/odbcabstraction/platform.h" instead? It seems that platform.h defines some macros before including windows.h.
There was a problem hiding this comment.
Sure, that's reasonable to use. I fixed it
| #ifdef _WIN32 | ||
| # include <windows.h> | ||
| #endif |
There was a problem hiding this comment.
Sure, that's reasonable to use. I fixed it
|
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 16ceade. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. |
…e#47517) ### Rationale for this change Add initial framework for building an ODBC driver dll ### What changes are included in this PR? - initial Flight SQL ODBC framework ### Are these changes tested? - Yes, on local Windows environment ### Are there any user-facing changes? - None * PR is extracted from PR apache#46099 * GitHub Issue: apache#47516 Authored-by: Alina (Xi) Li <alina.li@improving.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Rationale for this change
Add initial framework for building an ODBC driver dll
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?