pitrou commented on code in PR #765:
URL: https://github.com/apache/arrow-adbc/pull/765#discussion_r1238504656
##########
adbc.h:
##########
@@ -1095,6 +1237,112 @@ ADBC_EXPORT
AdbcStatusCode AdbcConnectionRelease(struct AdbcConnection* connection,
struct AdbcError* error);
+/// \brief Cancel the in-progress operation on a connection.
+///
+/// This can be called during AdbcConnectionGetObjects (or similar),
+/// or while consuming an ArrowArrayStream returned from such.
+/// Calling this function should make the other functions return
+/// ADBC_STATUS_CANCELLED (from ADBC functions) or ECANCELED (from
+/// methods of ArrowArrayStream).
+///
+/// This must always be thread-safe (other operations are not).
+///
+/// \since ADBC API revision 1.1.0
+/// \addtogroup adbc-1.1.0
+///
+/// \param[in] connection The connection to cancel.
+/// \param[out] error An optional location to return an error
+/// message if necessary.
+///
+/// \return ADBC_STATUS_INVALID_STATE if there is no operation to cancel.
+/// \return ADBC_STATUS_UNKNOWN if the operation could not be cancelled.
+ADBC_EXPORT
+AdbcStatusCode AdbcConnectionCancel(struct AdbcConnection* connection,
+ struct AdbcError* error);
+
+/// \brief Get a hierarchical view of system and user-defined functions.
+///
+/// The result is an Arrow dataset with the following schema:
+///
+/// | Field Name | Field Type |
+/// |--------------------------|-------------------------|
+/// | catalog_name | utf8 |
+/// | catalog_db_schemas | list<DB_SCHEMA_SCHEMA> |
+///
+/// DB_SCHEMA_SCHEMA is a Struct with fields:
+///
+/// | Field Name | Field Type |
+/// |--------------------------|-------------------------|
+/// | db_schema_name | utf8 |
+/// | db_schema_functions | list<FUNCTION_SCHEMA> |
+///
+/// FUNCTION_SCHEMA is a Struct with fields:
+///
+/// | Field Name | Field Type | Comments |
+/// |--------------------------|-------------------------|----------|
+/// | function_name | utf8 not null | |
+/// | remarks | utf8 | (1) |
+/// | function_type | int16 | (2) |
+/// | specific_name | utf8 | (3) |
+/// | function_columns | list<COLUMN_SCHEMA> | |
Review Comment:
> Given the difficulty and complexity we've seen with `GetObjects`, do we
want to follow the same path here for UDFs and Stored procedures? Or do we want
to try to find a less complex / less nested route for this to avoid the same
problems / complaints?
Can you elaborate on the difficulty? Is it about easily accessing nested
data from C++? If so, perhaps some separate helpers could be added for ease of
navigating struct arrays and scalars...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]