Skip to content

Conversation

dentiny
Copy link
Contributor

@dentiny dentiny commented Sep 27, 2025

I found this function is unused anywhere:

[/tmp/duckdb-httpfs] (main) 
vscode@eebee01fa8d2$ git grep "SetHttpfsClientImplementation"
src/httpfs_extension.cpp:static void SetHttpfsClientImplementation(DBConfig &config, const string &value) {


namespace duckdb {

static void SetHttpfsClientImplementation(DBConfig &config, const string &value) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks duplicate functionality with

auto callback_httpfs_client_implementation = [](ClientContext &context, SetScope scope, Value &parameter) {
auto &config = DBConfig::GetConfig(context);
string value = StringValue::Get(parameter);
if (config.http_util && config.http_util->GetName() == "WasmHTTPUtils") {
if (value == "wasm" || value == "default") {
return;
}
throw InvalidInputException("Unsupported option for httpfs_client_implementation, only `wasm` and "
"`default` are currently supported for duckdb-wasm");
}
#ifndef EMSCRIPTEN
if (value == "curl") {
if (!config.http_util || config.http_util->GetName() != "HTTPFSUtil-Curl") {
config.http_util = make_shared_ptr<HTTPFSCurlUtil>();
}
return;
}
if (value == "httplib" || value == "default") {
if (!config.http_util || config.http_util->GetName() != "HTTPFSUtil") {
config.http_util = make_shared_ptr<HTTPFSUtil>();
}
return;
}
#endif
throw InvalidInputException("Unsupported option for httpfs_client_implementation, only `curl`, `httplib` and "
"`default` are currently supported");
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant