GH-46096: [C++][FlightRPC] Environment and Connection Handle Allocation#47759
GH-46096: [C++][FlightRPC] Environment and Connection Handle Allocation#47759lidavidm merged 3 commits intoapache:mainfrom
Conversation
|
|
| SQLHENV env; | ||
|
|
||
| // Allocate an environment handle | ||
| SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env); |
There was a problem hiding this comment.
Should we check the return code? (Should we free the result?)
There was a problem hiding this comment.
yup, added check and freed the result
| namespace arrow::flight::sql::odbc { | ||
|
|
||
| TEST(SQLAllocHandle, TestSQLAllocHandleEnv) { | ||
| // ODBC Environment |
There was a problem hiding this comment.
nit: I don't think these comments add much
There was a problem hiding this comment.
remove ODBC environment comment
|
|
||
| TEST(SQLAllocEnv, TestSQLAllocEnv) { | ||
| // ODBC Environment | ||
| SQLHENV env; |
There was a problem hiding this comment.
ditto, should we check/free the result?
There was a problem hiding this comment.
added calls to free the result
alinaliBQ
left a comment
There was a problem hiding this comment.
We are working on the comments
Add comment from apache#47759 (comment)
Add comment from apache#47759 (comment)
85b1b11 to
21ba2a1
Compare
alinaliBQ
left a comment
There was a problem hiding this comment.
Addressed all code review comments
| SQLHENV env; | ||
|
|
||
| // Allocate an environment handle | ||
| SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &env); |
There was a problem hiding this comment.
yup, added check and freed the result
| namespace arrow::flight::sql::odbc { | ||
|
|
||
| TEST(SQLAllocHandle, TestSQLAllocHandleEnv) { | ||
| // ODBC Environment |
There was a problem hiding this comment.
remove ODBC environment comment
|
|
||
| TEST(SQLAllocEnv, TestSQLAllocEnv) { | ||
| // ODBC Environment | ||
| SQLHENV env; |
There was a problem hiding this comment.
added calls to free the result
abc38d9 to
6d0570a
Compare
| template <typename T> | ||
| class ConnectionTest : public T { | ||
| public: | ||
| using List = std::list<T>; | ||
| }; |
There was a problem hiding this comment.
| template <typename T> | |
| class ConnectionTest : public T { | |
| public: | |
| using List = std::list<T>; | |
| }; | |
| template <typename T> | |
| class ConnectionTest : public T { | |
| }; |
There was a problem hiding this comment.
Rebased and removed using List
* Tests will be added in separate PRs Add tests for SQLAllocEnv and SQLAllocConnect * Other test structure code will be in a separate PR Add comment Add comment from apache#47759 (comment) Work on code review comments Add test fixture for file Co-Authored-By: justing-bq <justin.gossett@improving.com> Add comment for `ConnectionRemoteTest` Add comment for `ReleaseConnection`
address comment
6d0570a to
906f413
Compare
| template <typename T> | ||
| class ConnectionTest : public T { | ||
| public: | ||
| using List = std::list<T>; | ||
| }; |
There was a problem hiding this comment.
Rebased and removed using List
|
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 62afc09. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 4 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…location (apache#47759) ### Rationale for this change ODBC driver needs to handle environment handle and connection handle allocation and deallocation. ### What changes are included in this PR? - Implement SQLAllocHandle and SQLFreeHandle APIs for allocating and deallocating environment and connection handles. - Tests ### Are these changes tested? - Tested locally on Windows MSVC. - Will be tested in CI after apache#47689 is merged ### Are there any user-facing changes? No * GitHub Issue: apache#46096 * GitHub Issue: apache#46097 Authored-by: Alina (Xi) Li <alina.li@improving.com> Signed-off-by: David Li <li.davidm96@gmail.com>
Rationale for this change
ODBC driver needs to handle environment handle and connection handle allocation and deallocation.
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?
No