lidavidm commented on code in PR #893:
URL: https://github.com/apache/arrow-adbc/pull/893#discussion_r1261533374


##########
go/adbc/drivermgr/adbc.h:
##########
@@ -334,25 +334,35 @@ struct ADBC_EXPORT AdbcError {
 /// Buffers) that can be optionally parsed by clients, beyond the
 /// standard AdbcError fields, without having to encode it in the
 /// error message.  The encoding of the data is driver-defined.
+/// Drivers may provide multiple error details.
 ///
-/// This can be called immediately after any API call that returns an
+/// This can be used immediately after any API call that returns an
 /// error.  Additionally, if an ArrowArrayStream returned from an
 /// AdbcConnection or an AdbcStatement returns an error, this can be
 /// immediately called from the associated AdbcConnection or
 /// AdbcStatement to get further error details (if available).  Making
 /// other API calls with that connection or statement may clear this
 /// error value.
 ///
-/// Drivers may provide multiple error details.  Each call to
-/// GetOptionBytes will return the next error detail.  The driver
-/// should return ADBC_STATUS_NOT_FOUND if there are no (more) error
-/// details.
+/// To use, call GetOptionInt with this option to get the number of
+/// available details.  Then, call GetOption with the option key
+/// ADBC_OPTION_ERROR_DETAILS_PREFIX + (zero-indexed index) to get the
+/// name of the error detail (for example, drivers that use gRPC
+/// underneath may provide the name of the gRPC trailer corresponding
+/// to the error detail).  GetOptionBytes with that option name will
+/// retrieve the value of the error detail (for example, a serialized
+/// Any-wrapped Protobuf).
 ///
-/// The type is uint8_t*.
+/// \since ADBC API revision 1.1.0
+/// \addtogroup adbc-1.1.0
+#define ADBC_OPTION_ERROR_DETAILS "adbc.error_details"
+
+/// \brief Canonical option name for error details.
 ///
+/// \see ADBC_OPTION_ERROR_DETAILS
 /// \since ADBC API revision 1.1.0
 /// \addtogroup adbc-1.1.0
-#define ADBC_OPTION_ERROR_DETAILS "error_details"
+#define ADBC_OPTION_ERROR_DETAILS_PREFIX "adbc.error_details."

Review Comment:
   For this: no, because the Go API adds to AdbcError instead of using this 
janky interface. Only C needs this.



-- 
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]

Reply via email to