[Code Style] Move ifdefs for attributes outside of test cases - #62
Merged
Conversation
alinaliBQ
marked this pull request as ready for review
July 9, 2025 18:41
rscales
reviewed
Jul 9, 2025
rscales
reviewed
Jul 9, 2025
rscales
reviewed
Jul 9, 2025
rscales
reviewed
Jul 9, 2025
rscales
approved these changes
Jul 9, 2025
alinaliBQ
commented
Jul 9, 2025
alinaliBQ
left a comment
Author
There was a problem hiding this comment.
Added 4 more items:
- [odbc_api.cc] for consistency, put the log messages as the first line after API definitions
- [entry_points.cc] replace
statementHandlewithstmtfor consistency - [connection_info_test.cc] Use camel case for test names to be consistent with rest of arrow code
- fix hstmt test case
Comment on lines
242
to
252
| // These information types are implemented by the Driver Manager alone. | ||
| TYPED_TEST(FlightSQLODBCTestBase, Test_SQL_DRIVER_HSTMT) { | ||
| // TODO This is failing due to no statement being created | ||
| // This should run after SQLGetStmtAttr is implemented | ||
| GTEST_SKIP(); | ||
| TYPED_TEST(FlightSQLODBCTestBase, TestSQLGetInfoDriverHstmt) { | ||
| this->connect(); | ||
|
|
||
| validate(this->conn, SQL_DRIVER_HSTMT, static_cast<SQLULEN>(0)); | ||
| // Value returned from driver manager is the stmt address | ||
| SQLHSTMT local_stmt = this->stmt; | ||
| SQLRETURN ret = SQLGetInfo(this->conn, SQL_DRIVER_HSTMT, &local_stmt, 0, 0); | ||
| EXPECT_EQ(ret, SQL_SUCCESS); | ||
| EXPECT_GT(local_stmt, static_cast<SQLHSTMT>(0)); | ||
|
|
||
| this->disconnect(); |
Author
There was a problem hiding this comment.
Added a test case fix here as well. I needed to call SQLGetInfo directly since SQL_DRIVER_HSTMT requires the input this->stmt according to the spec: https://learn.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetinfo-function?view=sql-server-ver17 cc @rscales
rscales
approved these changes
Jul 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move
#ifdeffor attributes outside of test cases