zeroshade commented on code in PR #3694:
URL: https://github.com/apache/arrow-adbc/pull/3694#discussion_r2528589986
##########
c/driver_manager/adbc_driver_manager.cc:
##########
@@ -1691,16 +1691,45 @@ AdbcStatusCode AdbcDatabaseSetOption(struct
AdbcDatabase* database, const char*
TempDatabase* args = reinterpret_cast<TempDatabase*>(database->private_data);
if (std::strcmp(key, "driver") == 0) {
std::string_view v{value};
- std::string::size_type pos = v.find("://");
+ std::string::size_type pos = v.find(":");
if (pos != std::string::npos) {
std::string_view d = v.substr(0, pos);
args->driver = std::string{d};
- args->options["uri"] = std::string{v};
+
+ auto next = v.at(pos + 1);
+ if (next == '/' || next == ':') {
+ // uri is like 'driver://...' or 'driver:file::...'
Review Comment:
I realized that if `file::` is the only case that supports `::`, it means
that we'd never have a case where it's `driver::something:`, so I still only
have to check whether the next character is `/` or not and have updated the
logic accordingly
--
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]