-
Notifications
You must be signed in to change notification settings - Fork 3.9k
GH-47697: [C++][FlightRPC] Add ODBC API placeholders #47725
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
Conversation
|
Update entry_points.cc Update odbc_api.cc
63a95cd
to
833824a
Compare
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.
+1
SQLSMALLINT fk_catalog_name_length, SQLWCHAR* fk_schema_name, | ||
SQLSMALLINT fk_schema_name_length, SQLWCHAR* fk_table_name, | ||
SQLSMALLINT fk_table_name_length) { | ||
ARROW_LOG(DEBUG) << "SQLForeignKeysW called with stmt: " << stmt |
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.
ARROW_LOG(DEBUG) << "SQLForeignKeysW called with stmt: " << stmt | |
ARROW_LOG(DEBUG) << "SQLForeignKeys called with stmt: " << stmt |
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.
Unicode support will be added in upcoming PRs. Some ODBC unicode APIs will have a W
at the end after compilation, because some of the function names are macros that expand to names with W
. Please see:
https://github.com/microsoft/ODBC-Specification/blob/4dda95986bda5d3b55d7749315d3e5a0951c1e50/Windows/inc/sqlucode.h#L952-L996
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.
OK. This may be better then:
ARROW_LOG(DEBUG) << "SQLForeignKeysW called with stmt: " << stmt | |
ARROW_LOG(DEBUG) << #SQLColAttribute " called with stmt: " << stmt |
<< ", fk_table_name: " << static_cast<const void*>(fk_table_name) | ||
<< ", fk_table_name_length: " << fk_table_name_length; | ||
return ODBC::ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() { | ||
throw driver::odbcabstraction::DriverException("SQLForeignKeysW is not implemented", |
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.
throw driver::odbcabstraction::DriverException("SQLForeignKeysW is not implemented", | |
throw driver::odbcabstraction::DriverException("SQLForeignKeys is not implemented", |
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.
Please see #47725 (comment)
<< ", pk_catalog_name: " << static_cast<const void*>(pk_catalog_name) | ||
<< ", pk_catalog_name_length: " << pk_catalog_name_length |
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.
Should we print as string...?
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.
To get the variable names in string, the user can use ODBC driver manager to trace the API calls and the inputs. I hope printing the addresses for now is ok
SQLSMALLINT catalog_name_length, SQLWCHAR* schema_name, | ||
SQLSMALLINT schema_name_length, SQLWCHAR* table_name, | ||
SQLSMALLINT table_name_length) { | ||
ARROW_LOG(DEBUG) << "SQLPrimaryKeysW called with stmt: " << stmt |
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.
ARROW_LOG(DEBUG) << "SQLPrimaryKeysW called with stmt: " << stmt | |
ARROW_LOG(DEBUG) << "SQLPrimaryKeys called with stmt: " << stmt |
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.
Please see #47725 (comment)
<< ", table_name: " << static_cast<const void*>(table_name) | ||
<< ", table_name_length: " << table_name_length; | ||
return ODBC::ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() { | ||
throw driver::odbcabstraction::DriverException("SQLPrimaryKeysW is not implemented", |
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.
throw driver::odbcabstraction::DriverException("SQLPrimaryKeysW is not implemented", | |
throw driver::odbcabstraction::DriverException("SQLPrimaryKeys is not implemented", |
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.
Please see #47725 (comment)
<< ", result: " << static_cast<const void*>(result); | ||
// GH-46096 TODO: Implement SQLAllocEnv | ||
// GH-46097 TODO: Implement SQLAllocConnect, pre-requisite requires SQLAllocEnv | ||
// implementation GH-47706 TODO: Implement SQLAllocStmt, pre-requisite requires |
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.
// implementation GH-47706 TODO: Implement SQLAllocStmt, pre-requisite requires | |
// implementation | |
// GH-47706 TODO: Implement SQLAllocStmt, pre-requisite requires |
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.
Good catch, fixed
// GH-46096 TODO: Implement SQLAllocEnv | ||
// GH-46097 TODO: Implement SQLAllocConnect, pre-requisite requires SQLAllocEnv | ||
// implementation GH-47706 TODO: Implement SQLAllocStmt, pre-requisite requires | ||
// SQLDriverConnect implementation GH-47707 TODO: Implement SQL_HANDLE_DESC for |
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.
// SQLDriverConnect implementation GH-47707 TODO: Implement SQL_HANDLE_DESC for | |
// SQLDriverConnect implementation | |
// GH-47707 TODO: Implement SQL_HANDLE_DESC for |
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.
Good catch, fixed
SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length, | ||
SQLSMALLINT* string_length_ptr) { | ||
// GH-46573 TODO: Implement additional fields types | ||
ARROW_LOG(DEBUG) << "SQLGetDiagFieldW called with handle_type: " << handle_type |
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.
ARROW_LOG(DEBUG) << "SQLGetDiagFieldW called with handle_type: " << handle_type | |
ARROW_LOG(DEBUG) << "SQLGetDiagField called with handle_type: " << handle_type |
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.
Please see #47725 (comment)
SQLWCHAR* sql_state, SQLINTEGER* native_error_ptr, | ||
SQLWCHAR* message_text, SQLSMALLINT buffer_length, | ||
SQLSMALLINT* text_length_ptr) { | ||
ARROW_LOG(DEBUG) << "SQLGetDiagRecW called with handle_type: " << handle_type |
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.
ARROW_LOG(DEBUG) << "SQLGetDiagRecW called with handle_type: " << handle_type | |
ARROW_LOG(DEBUG) << "SQLGetDiagRec called with handle_type: " << handle_type |
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.
Please see #47725 (comment)
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.
Addressing @kou's comments
SQLPOINTER diag_info_ptr, SQLSMALLINT buffer_length, | ||
SQLSMALLINT* string_length_ptr) { | ||
// GH-46573 TODO: Implement additional fields types | ||
ARROW_LOG(DEBUG) << "SQLGetDiagFieldW called with handle_type: " << handle_type |
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.
Please see #47725 (comment)
SQLWCHAR* sql_state, SQLINTEGER* native_error_ptr, | ||
SQLWCHAR* message_text, SQLSMALLINT buffer_length, | ||
SQLSMALLINT* text_length_ptr) { | ||
ARROW_LOG(DEBUG) << "SQLGetDiagRecW called with handle_type: " << handle_type |
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.
Please see #47725 (comment)
SQLSMALLINT catalog_name_length, SQLWCHAR* schema_name, | ||
SQLSMALLINT schema_name_length, SQLWCHAR* table_name, | ||
SQLSMALLINT table_name_length) { | ||
ARROW_LOG(DEBUG) << "SQLPrimaryKeysW called with stmt: " << stmt |
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.
Please see #47725 (comment)
<< ", table_name: " << static_cast<const void*>(table_name) | ||
<< ", table_name_length: " << table_name_length; | ||
return ODBC::ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() { | ||
throw driver::odbcabstraction::DriverException("SQLPrimaryKeysW is not implemented", |
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.
Please see #47725 (comment)
<< ", fk_table_name: " << static_cast<const void*>(fk_table_name) | ||
<< ", fk_table_name_length: " << fk_table_name_length; | ||
return ODBC::ODBCStatement::ExecuteWithDiagnostics(stmt, SQL_ERROR, [=]() { | ||
throw driver::odbcabstraction::DriverException("SQLForeignKeysW is not implemented", |
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.
Please see #47725 (comment)
<< ", pk_catalog_name: " << static_cast<const void*>(pk_catalog_name) | ||
<< ", pk_catalog_name_length: " << pk_catalog_name_length |
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.
To get the variable names in string, the user can use ODBC driver manager to trace the API calls and the inputs. I hope printing the addresses for now is ok
After merging your PR, Conbench analyzed the 2 benchmarking runs that have been run so far on merge-commit 353a0a2. 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. |
Thanks for merging it |
) ### Rationale for this change Add placeholders for ODBC APIs to make it easier to create draft PRs for ODBC APIs ### What changes are included in this PR? Add placeholders for ODBC APIs and link the corresponding GitHub issues. Minor build fixes ### Are these changes tested? Tested on local machine ### Are there any user-facing changes? No * GitHub Issue: apache#47697 Authored-by: Alina (Xi) Li <[email protected]> Signed-off-by: Sutou Kouhei <[email protected]>
Rationale for this change
Add placeholders for ODBC APIs to make it easier to create draft PRs for ODBC APIs
What changes are included in this PR?
Add placeholders for ODBC APIs and link the corresponding GitHub issues.
Minor build fixes
Are these changes tested?
Tested on local machine
Are there any user-facing changes?
No