-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GH-47720: [C++][FlightRPC] ODBC Columns Metadata #48049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-Authored-By: alinalibq <[email protected]>
|
|
| // Helper functions | ||
| void CheckSQLColumns( | ||
| SQLHSTMT stmt, const std::wstring& expected_table, | ||
| const std::wstring& expected_column, const SQLINTEGER& expected_data_type, | ||
| const std::wstring& expected_type_name, const SQLINTEGER& expected_column_size, | ||
| const SQLINTEGER& expected_buffer_length, const SQLSMALLINT& expected_decimal_digits, | ||
| const SQLSMALLINT& expected_num_prec_radix, const SQLSMALLINT& expected_nullable, | ||
| const SQLSMALLINT& expected_sql_data_type, const SQLSMALLINT& expected_date_time_sub, | ||
| const SQLINTEGER& expected_octet_char_length, | ||
| const SQLINTEGER& expected_ordinal_position, | ||
| const std::wstring& expected_is_nullable) { | ||
| CheckStringColumnW(stmt, 3, expected_table); // table name | ||
| CheckStringColumnW(stmt, 4, expected_column); // column name | ||
|
|
||
| CheckIntColumn(stmt, 5, expected_data_type); // data type | ||
|
|
||
| CheckStringColumnW(stmt, 6, expected_type_name); // type name | ||
|
|
||
| CheckIntColumn(stmt, 7, expected_column_size); // column size | ||
| CheckIntColumn(stmt, 8, expected_buffer_length); // buffer length | ||
|
|
||
| CheckSmallIntColumn(stmt, 9, expected_decimal_digits); // decimal digits | ||
| CheckSmallIntColumn(stmt, 10, expected_num_prec_radix); // num prec radix | ||
| CheckSmallIntColumn(stmt, 11, | ||
| expected_nullable); // nullable | ||
|
|
||
| CheckNullColumnW(stmt, 12); // remarks | ||
| CheckNullColumnW(stmt, 13); // column def | ||
|
|
||
| CheckSmallIntColumn(stmt, 14, expected_sql_data_type); // sql data type | ||
| CheckSmallIntColumn(stmt, 15, expected_date_time_sub); // sql date type sub | ||
| CheckIntColumn(stmt, 16, expected_octet_char_length); // char octet length | ||
| CheckIntColumn(stmt, 17, | ||
| expected_ordinal_position); // oridinal position | ||
|
|
||
| CheckStringColumnW(stmt, 18, expected_is_nullable); // is nullable | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lidavidm do you have any feedback on this type of helper functions CheckSQLColumns that check results from multiple columns? This type is different from the getter functions like ValidateGreaterThan(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose this is fine given the structure of the test
Rationale for this change
Add support for returning columns metadata from the connected data source.
What changes are included in this PR?
Are these changes tested?
Tested in local MSVC
Are there any user-facing changes?
N/A