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


##########
adbc.h:
##########
@@ -1183,7 +1204,11 @@ AdbcStatusCode AdbcStatementExecutePartitions(struct 
AdbcStatement* statement,
 ///   driver.
 ///
 /// Although drivers may choose any name for this function, the
-/// recommended name is "AdbcDriverInit".
+/// recommended name is "AdbcDriverInit". If you use the recommended
+/// name, then driver managers will be able to automatically find
+/// the entrypoint function. Drivers may also expose the same function
+/// under a unique symbol so that multiple drivers can be statically
+/// linked into a single binary without any conflicts.

Review Comment:
   In that case the options are basically:
   
   - One driver per binary (driver manager or no): use the Adbc* names. If 
loaded via the driver manager, it will automatically load the driver via the 
default name, AdbcDriverInit. (Also, when creating the table of pointers in 
AdbcDriverInit, use private/namespaced names for each function instead of the 
Adbc* name because otherwise the dynamic linker may resolve those names to the 
driver manager's definition instead of yours.)
   - Multiple drivers in one shared object, loaded via the driver manager: 
expose multiple distinct DriverInit names, which the user will have to manually 
configure. (Same caveat as before regarding the table of binaries, obviously.)
   - Multiple drivers, all statically linked at the end: the current 
implementations do not support this, but no driver can define any Adbc* symbol 
(or you have to do whatever linker magic is necessary to avoid using those 
symbols). You must link to and use the driver manager.



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