This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch spec-1.2.0
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/spec-1.2.0 by this push:
     new e13227347 fix: add an AdbcDriver* argument to DriverGetOptionsList 
(#4900)
e13227347 is described below

commit e13227347ca7d0350664fcbeebfd7fb37f00a13d
Author: Curt Hagenlocher <[email protected]>
AuthorDate: Thu Oct 15 16:22:00 2026 -0700

    fix: add an AdbcDriver* argument to DriverGetOptionsList (#4900)
    
    I was looking at implementing the current parts of the draft 1.2 spec
    and Claude suggested that this function should take a `struct
    AdbcDriver*` as an argument in order to solve two problems:
    
    1) The driver manager exports a global `AdbcDriverGetOptionsList` but it
    has nothing to route to.
    2) Implementations like C# that route the API through native shims to
    one of multiple drivers and use `private_data` to pick a routing target
    won't be able to do so.
    
    Reference: #630
---
 c/include/arrow-adbc/adbc.h         | 12 +++++++++---
 go/adbc/drivermgr/arrow-adbc/adbc.h | 12 +++++++++---
 2 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/c/include/arrow-adbc/adbc.h b/c/include/arrow-adbc/adbc.h
index 188f1c107..c36973525 100644
--- a/c/include/arrow-adbc/adbc.h
+++ b/c/include/arrow-adbc/adbc.h
@@ -1508,8 +1508,8 @@ struct ADBC_EXPORT AdbcDriver {
 
   int (*ErrorGetVendorCode)(const struct AdbcError*);
 
-  AdbcStatusCode (*DriverGetOptionsList)(uint32_t, struct ArrowArrayStream*,
-                                         struct AdbcError*);
+  AdbcStatusCode (*DriverGetOptionsList)(struct AdbcDriver*, uint32_t,
+                                         struct ArrowArrayStream*, struct 
AdbcError*);
 
   AdbcStatusCode (*MultiResultSetNext)(struct AdbcMultiResultSet*,
                                        struct ArrowArrayStream*, int64_t*,
@@ -1598,6 +1598,10 @@ struct ADBC_EXPORT AdbcDriver {
 
 /// \brief Get a list of the options supported by the driver.
 ///
+/// Callers pass in an initialized AdbcDriver so that the driver manager
+/// can route the call and so that a library which exports multiple drivers
+/// through shared code can find the right one (e.g. through private_data).
+///
 /// The result is an Arrow dataset with the following schema:
 ///
 /// | Field Name               | Field Type              | Comments |
@@ -1622,12 +1626,14 @@ struct ADBC_EXPORT AdbcDriver {
 /// | value                    | utf8 not null           |
 /// | documentation            | utf8                    |
 ///
+/// \param[in] driver The (initialized) driver to query.
 /// \param[in] level Which ADBC type the option applies to.
 /// \param[out] out The result set.
 /// \param[out] error Error details, if an error occurs.
 /// \since ADBC API revision 1.2.0
 ADBC_EXPORT
-AdbcStatusCode AdbcDriverGetOptionsList(uint32_t level, struct 
ArrowArrayStream* out,
+AdbcStatusCode AdbcDriverGetOptionsList(struct AdbcDriver* driver, uint32_t 
level,
+                                        struct ArrowArrayStream* out,
                                         struct AdbcError* error);
 
 /// @}
diff --git a/go/adbc/drivermgr/arrow-adbc/adbc.h 
b/go/adbc/drivermgr/arrow-adbc/adbc.h
index 188f1c107..c36973525 100644
--- a/go/adbc/drivermgr/arrow-adbc/adbc.h
+++ b/go/adbc/drivermgr/arrow-adbc/adbc.h
@@ -1508,8 +1508,8 @@ struct ADBC_EXPORT AdbcDriver {
 
   int (*ErrorGetVendorCode)(const struct AdbcError*);
 
-  AdbcStatusCode (*DriverGetOptionsList)(uint32_t, struct ArrowArrayStream*,
-                                         struct AdbcError*);
+  AdbcStatusCode (*DriverGetOptionsList)(struct AdbcDriver*, uint32_t,
+                                         struct ArrowArrayStream*, struct 
AdbcError*);
 
   AdbcStatusCode (*MultiResultSetNext)(struct AdbcMultiResultSet*,
                                        struct ArrowArrayStream*, int64_t*,
@@ -1598,6 +1598,10 @@ struct ADBC_EXPORT AdbcDriver {
 
 /// \brief Get a list of the options supported by the driver.
 ///
+/// Callers pass in an initialized AdbcDriver so that the driver manager
+/// can route the call and so that a library which exports multiple drivers
+/// through shared code can find the right one (e.g. through private_data).
+///
 /// The result is an Arrow dataset with the following schema:
 ///
 /// | Field Name               | Field Type              | Comments |
@@ -1622,12 +1626,14 @@ struct ADBC_EXPORT AdbcDriver {
 /// | value                    | utf8 not null           |
 /// | documentation            | utf8                    |
 ///
+/// \param[in] driver The (initialized) driver to query.
 /// \param[in] level Which ADBC type the option applies to.
 /// \param[out] out The result set.
 /// \param[out] error Error details, if an error occurs.
 /// \since ADBC API revision 1.2.0
 ADBC_EXPORT
-AdbcStatusCode AdbcDriverGetOptionsList(uint32_t level, struct 
ArrowArrayStream* out,
+AdbcStatusCode AdbcDriverGetOptionsList(struct AdbcDriver* driver, uint32_t 
level,
+                                        struct ArrowArrayStream* out,
                                         struct AdbcError* error);
 
 /// @}

Reply via email to