wjones127 commented on code in PR #417:
URL: https://github.com/apache/arrow-adbc/pull/417#discussion_r1096830064


##########
adbc.h:
##########
@@ -624,18 +624,18 @@ struct ADBC_EXPORT AdbcDriver {
   AdbcStatusCode (*DatabaseRelease)(struct AdbcDatabase*, struct AdbcError*);
 
   AdbcStatusCode (*ConnectionCommit)(struct AdbcConnection*, struct 
AdbcError*);
-  AdbcStatusCode (*ConnectionGetInfo)(struct AdbcConnection*, uint32_t*, 
size_t,
+  AdbcStatusCode (*ConnectionGetInfo)(struct AdbcConnection*, const uint32_t*, 
size_t,
                                       struct ArrowArrayStream*, struct 
AdbcError*);
   AdbcStatusCode (*ConnectionGetObjects)(struct AdbcConnection*, int, const 
char*,
-                                         const char*, const char*, const 
char**,
+                                         const char*, const char*, char const* 
const*,
                                          const char*, struct ArrowArrayStream*,
                                          struct AdbcError*);
   AdbcStatusCode (*ConnectionGetTableSchema)(struct AdbcConnection*, const 
char*,
                                              const char*, const char*,
                                              struct ArrowSchema*, struct 
AdbcError*);
   AdbcStatusCode (*ConnectionGetTableTypes)(struct AdbcConnection*,
                                             struct ArrowArrayStream*, struct 
AdbcError*);
-  AdbcStatusCode (*ConnectionInit)(struct AdbcConnection*, struct 
AdbcDatabase*,
+  AdbcStatusCode (*ConnectionInit)(struct AdbcConnection*, struct AdbcDatabase 
const*,
                                    struct AdbcError*);
   AdbcStatusCode (*ConnectionNew)(struct AdbcConnection*, struct AdbcError*);

Review Comment:
   Also, this is probably just a "Will not understanding C FFI" problem, but it 
was unclear to me at first that the `ConnectionNew`, `DatabaseNew` and 
`StatementNew` expected that the pointers passed are initialized and zero-ed 
memory, and not an uninitialized memory allocation or a null pointer. That 
might just be mixing up the notions of what "initialized" means--the memory 
itself or the connection/database/statement data. But 
    the docstring `Allocate a new (but uninitialized) database` almost reads as 
if the method itself was doing the memory allocation and initialization. Does 
that seem worth clarifying?



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