Skip to content

Conversation

@alinaliBQ
Copy link
Contributor

@alinaliBQ alinaliBQ commented Nov 4, 2025

Rationale for this change

Add support for returning columns metadata from the connected data source.

What changes are included in this PR?

  • SQLColumns & Test

Are these changes tested?

Tested in local MSVC

Are there any user-facing changes?

N/A

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

⚠️ GitHub issue #47720 has been automatically assigned in GitHub to PR creator.

Comment on lines +46 to +82
// 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
}
Copy link
Contributor Author

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(...)

Copy link
Member

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

@github-actions github-actions bot added awaiting committer review Awaiting committer review awaiting changes Awaiting changes and removed awaiting review Awaiting review awaiting committer review Awaiting committer review labels Nov 4, 2025
@github-actions github-actions bot added awaiting merge Awaiting merge and removed awaiting changes Awaiting changes labels Nov 6, 2025
@alinaliBQ alinaliBQ changed the title GH-47720: [C++][FlightRPC] WIP: ODBC Columns Metadata GH-47720: [C++][FlightRPC] ODBC Columns Metadata Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants