Uh oh!
There was an error while loading. Please reload this page.
GH-47709: [C++][FlightRPC] Return ODBC and data source information - #47762
Conversation
alinaliBQ
commented
Oct 8, 2025
Uh oh!
There was an error while loading. Please reload this page.
| // Driver Information | ||
| TYPED_TEST(FlightSQLODBCTestBase, TestSQLGetInfoActiveEnvironments) { | ||
| this->Connect(); |
There was a problem hiding this comment.
Could the connect/disconnect be put in a SetUp/TearDown?
Also it might not be wise to add the tests directly to FlightSQLODBCTestBase; could we create a fixture for this test suite specifically (by subclassing)?
There was a problem hiding this comment.
yes, added separate test fixture ConnectionInfoTest
| TYPED_TEST(FlightSQLODBCTestBase, TestSQLGetInfoDriverName) { | ||
| this->Connect(); | ||
| Validate(this->conn, SQL_DRIVER_NAME, (SQLWCHAR*)L"Arrow Flight ODBC Driver"); |
e6f61c6 to
49745a6Compare
alinaliBQ
left a comment
There was a problem hiding this comment.
Worked on code review comments
Uh oh!
There was an error while loading. Please reload this page.
| // Driver Information | ||
| TYPED_TEST(FlightSQLODBCTestBase, TestSQLGetInfoActiveEnvironments) { | ||
| this->Connect(); |
There was a problem hiding this comment.
yes, added separate test fixture ConnectionInfoTest
| TYPED_TEST(FlightSQLODBCTestBase, TestSQLGetInfoDriverName) { | ||
| this->Connect(); | ||
| Validate(this->conn, SQL_DRIVER_NAME, (SQLWCHAR*)L"Arrow Flight ODBC Driver"); |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
5452bfd to
f7a7386Compare| void ValidateGreaterThan(SQLHDBC connection, SQLUSMALLINT info_type, | ||
| SQLULEN compared_value) { |
There was a problem hiding this comment.
I do have the same general comment: I think you would be better off creating utility getters (that throw if they fail) and then using standard GTest assertions, instead of making a function for every combination of data type and comparator. (Also, can they be shared across test files?)
There was a problem hiding this comment.
Yea when I saw your comment on the SQLStmtAttr PR, I thought of this PR as well since it also has the GreaterThan functions. I was waiting to see if the changes we made for SQLStmtAttr PR #47773 are what you are looking for. This is something we will be working on for sure.
On the other note, I am not sure if sharing certain utility getter across test files would be useful, since for example SQLGetInfo will only be called in connection_info_test.cc and no other test files. We won't be having copies of utility getters in different test files. 👍
There was a problem hiding this comment.
Ah, if this is the same test file then never mind that.
There was a problem hiding this comment.
@lidavidm I have fixed and added the utility getters, please have another look, thanks!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f7a7386 to
f4aec24Compare
alinaliBQ
left a comment
There was a problem hiding this comment.
Addressed code review comments
| void ValidateGreaterThan(SQLHDBC connection, SQLUSMALLINT info_type, | ||
| SQLULEN compared_value) { |
There was a problem hiding this comment.
@lidavidm I have fixed and added the utility getters, please have another look, thanks!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
605971d to
fc711aeComparefc711ae to
c701849ComparealinaliBQ
commented
Nov 29, 2025
Rebased and tested PR changes on local MSVC. PR is ready to be merged |
Co-Authored-By: rscales <robscales@icloud.com> Create connection_info_test.cc Add SQLGetInfo tests Co-authored-by: justing-bq <justin.gossett@improving.com> Co-Authored-By: rscales <robscales@icloud.com> Address code review comments Co-authored-by: justing-bq <justin.gossett@improving.com> Work on code review comments Fix build issues with tests Use Utility getters for SQLGetInfo Remove `using List` * fix build issues Add truncation test
c701849 to
026b2a2CompareUh oh!
There was an error while loading. Please reload this page.
After merging your PR, Conbench analyzed the 3 benchmarking runs that have been run so far on merge-commit 2571c2c. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 8 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…ion (apache#47762) ### Rationale for this change ODBC needs to give BI tools information about the driver itself and the data source it is connected to. ### What changes are included in this PR? - Implementation of `SQLGetinfo` to return driver and data source information - Add default values for SQLGetInfo in `get_info_cache.cc` - Tests ### Are these changes tested? Tested on local MSVC Windows ### Are there any user-facing changes? No * GitHub Issue: apache#47709
Rationale for this change
ODBC needs to give BI tools information about the driver itself and the data source it is connected to.
What changes are included in this PR?
SQLGetinfoto return driver and data source informationget_info_cache.ccAre these changes tested?
Tested on local MSVC Windows
Are there any user-facing changes?
No