What feature or improvement would you like to see?
When I first set up adbc_clickhouse, I didn't realize that there was an expected naming convention for ADBC drivers: ClickHouse/adbc_clickhouse#66
As of writing, this is not really documented anywhere:
The only discussion I found regarding naming conventions in my initial research was in the docs for adbc_ffi::export_driver!(), which doesn't prescribe a naming convention but just explains how the entrypoint symbol lookup works: https://docs.rs/adbc_ffi/0.23.0/adbc_ffi/macro.export_driver.html
I chose adbc_clickhouse (and AdbcClickhouseInit) because it felt more concise than adbc_driver_clickhouse (and AdbcDriverClickhouseInit) while still seeming to work for the rules laid out by export_driver!(). It loaded just fine with the Rust adbc_driver_manager crate.
The example dummy driver for Rust appears to support this choice:
-
|
adbc_ffi::export_driver!(AdbcDummyInit, DummyDriver); |
However, it sounds like some driver managers specifically look for AdbcDriver*Init and break if you try to load a driver that doesn't follow that convention. Unfortunately, ClickHouse/adbc_clickhouse#66 is all the context I have here.
To work around this, the driver binary ends up getting renamed during the release process to libadbc_driver_clickhouse.so: https://github.com/adbc-drivers/clickhouse/blob/main/src/ci/scripts/build.sh#L46
And an additional AdbcDriverClickhouseInit entrypoint gets added for compatibility with old driver managers that don't recognize the entrypoint manifest key: https://github.com/adbc-drivers/clickhouse/blob/41ef9369dae4c594edc926cdf6858140a949cdb3/src/ci/scripts/pre-build.sh#L33-L39
I'm not really comfortable with this situation because it means the driver installed through dbc has a different filename and entrypoint than if the driver is built manually, which could confuse and frustrate users trying to contribute to the driver or test the latest changes on main.
We're prepared to resolve this for good on our end (ClickHouse/adbc_clickhouse#75). However, this could have been avoided if the expected naming conventions were documented better.
What feature or improvement would you like to see?
When I first set up
adbc_clickhouse, I didn't realize that there was an expected naming convention for ADBC drivers: ClickHouse/adbc_clickhouse#66As of writing, this is not really documented anywhere:
The only discussion I found regarding naming conventions in my initial research was in the docs for
adbc_ffi::export_driver!(), which doesn't prescribe a naming convention but just explains how the entrypoint symbol lookup works: https://docs.rs/adbc_ffi/0.23.0/adbc_ffi/macro.export_driver.htmlI chose
adbc_clickhouse(andAdbcClickhouseInit) because it felt more concise thanadbc_driver_clickhouse(andAdbcDriverClickhouseInit) while still seeming to work for the rules laid out byexport_driver!(). It loaded just fine with the Rustadbc_driver_managercrate.The example dummy driver for Rust appears to support this choice:
arrow-adbc/rust/driver/dummy/Cargo.toml
Line 19 in f1d6412
arrow-adbc/rust/driver/dummy/src/lib.rs
Line 941 in f1d6412
However, it sounds like some driver managers specifically look for
AdbcDriver*Initand break if you try to load a driver that doesn't follow that convention. Unfortunately, ClickHouse/adbc_clickhouse#66 is all the context I have here.To work around this, the driver binary ends up getting renamed during the release process to
libadbc_driver_clickhouse.so: https://github.com/adbc-drivers/clickhouse/blob/main/src/ci/scripts/build.sh#L46And an additional
AdbcDriverClickhouseInitentrypoint gets added for compatibility with old driver managers that don't recognize theentrypointmanifest key: https://github.com/adbc-drivers/clickhouse/blob/41ef9369dae4c594edc926cdf6858140a949cdb3/src/ci/scripts/pre-build.sh#L33-L39I'm not really comfortable with this situation because it means the driver installed through
dbchas a different filename and entrypoint than if the driver is built manually, which could confuse and frustrate users trying to contribute to the driver or test the latest changes onmain.We're prepared to resolve this for good on our end (ClickHouse/adbc_clickhouse#75). However, this could have been avoided if the expected naming conventions were documented better.