Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion duckdb
Submodule duckdb updated 91 files
+7 −12 .github/config/out_of_tree_extensions.cmake
+414 −2,152 .github/patches/extensions/httpfs/fix.patch
+0 −278 .github/patches/extensions/mysql_scanner/fix.patch
+0 −285 .github/patches/extensions/postgres_scanner/fix.patch
+0 −377 .github/patches/extensions/spatial/fix.patch
+0 −261 .github/patches/extensions/sqlite_scanner/fix.patch
+0 −125 .github/patches/extensions/vss/fix.patch
+1 −1 .github/workflows/NightlyTests.yml
+1 −1 extension/core_functions/include/core_functions/scalar/date_functions.hpp
+2 −2 extension/core_functions/lambda_functions.cpp
+1 −1 extension/core_functions/scalar/date/functions.json
+31 −42 extension/json/include/json_multi_file_info.hpp
+13 −4 extension/json/include/json_reader.hpp
+17 −33 extension/json/json_multi_file_info.cpp
+1 −1 extension/parquet/column_writer.cpp
+1 −1 extension/parquet/geo_parquet.cpp
+33 −41 extension/parquet/include/parquet_multi_file_info.hpp
+15 −4 extension/parquet/include/parquet_reader.hpp
+6 −5 extension/parquet/include/reader/expression_column_reader.hpp
+63 −67 extension/parquet/parquet_multi_file_info.cpp
+5 −5 extension/parquet/reader/expression_column_reader.cpp
+15 −7 scripts/regression/test_runner.py
+94 −25 src/catalog/catalog_entry/duck_table_entry.cpp
+5 −3 src/common/enum_util.cpp
+1 −0 src/common/enums/CMakeLists.txt
+271 −0 src/common/enums/http_status_code.cpp
+9 −2 src/common/multi_file/CMakeLists.txt
+24 −0 src/common/multi_file/base_file_reader.cpp
+44 −0 src/common/multi_file/multi_file_function.cpp
+120 −0 src/common/multi_file/multi_file_reader.cpp
+63 −0 src/common/multi_file/union_by_name.cpp
+6 −4 src/common/string_util.cpp
+37 −48 src/execution/operator/csv_scanner/table_function/csv_multi_file_info.cpp
+21 −11 src/function/scalar/struct/remap_struct.cpp
+21 −0 src/function/table/version/pragma_version.cpp
+12 −0 src/include/duckdb.h
+91 −0 src/include/duckdb/common/enums/http_status_code.hpp
+18 −80 src/include/duckdb/common/http_util.hpp
+23 −2 src/include/duckdb/common/multi_file/base_file_reader.hpp
+86 −37 src/include/duckdb/common/multi_file/multi_file_function.hpp
+21 −90 src/include/duckdb/common/multi_file/multi_file_reader.hpp
+4 −0 src/include/duckdb/common/multi_file/multi_file_states.hpp
+4 −51 src/include/duckdb/common/multi_file/union_by_name.hpp
+4 −0 src/include/duckdb/common/windows_undefs.hpp
+19 −9 src/include/duckdb/execution/operator/csv_scanner/csv_file_scanner.hpp
+38 −41 src/include/duckdb/execution/operator/csv_scanner/csv_multi_file_info.hpp
+2 −0 src/include/duckdb/main/capi/extension_api.hpp
+2 −1 src/include/duckdb/main/capi/header_generation/apis/v1/unstable/new_open_connect_functions.json
+27 −0 src/include/duckdb/main/capi/header_generation/functions/open_connect.json
+4 −2 src/include/duckdb/main/client_context.hpp
+4 −2 src/include/duckdb/main/connection.hpp
+1 −0 src/include/duckdb/main/database.hpp
+1 −0 src/include/duckdb/main/extension_entries.hpp
+1 −0 src/include/duckdb/optimizer/join_order/relation_statistics_helper.hpp
+7 −2 src/include/duckdb/planner/binder.hpp
+1 −1 src/include/duckdb/storage/statistics/base_statistics.hpp
+2 −0 src/include/duckdb_extension.h
+8 −1 src/main/capi/data_chunk-c.cpp
+26 −0 src/main/capi/duckdb-c.cpp
+3 −2 src/main/client_context.cpp
+2 −2 src/main/connection.cpp
+4 −4 src/main/extension/extension_install.cpp
+49 −149 src/main/http/http_util.cpp
+5 −3 src/main/relation/read_csv_relation.cpp
+19 −23 src/optimizer/join_order/relation_statistics_helper.cpp
+2 −1 src/planner/bind_context.cpp
+2 −1 src/planner/binder/expression/bind_columnref_expression.cpp
+2 −1 src/planner/binder/expression/bind_function_expression.cpp
+2 −2 src/planner/binder/statement/bind_drop.cpp
+9 −5 src/planner/binder/tableref/bind_basetableref.cpp
+10 −4 src/storage/compression/dictionary/decompression.cpp
+1 −2 src/storage/compression/dictionary_compression.cpp
+71 −0 test/api/capi/capi_scalar_functions.cpp
+28 −0 test/api/capi/test_capi_table_description.cpp
+22 −0 test/api/test_get_table_names.cpp
+89 −0 test/sql/alter/list/add_column_in_struct.test
+58 −0 test/sql/alter/list/drop_column_in_struct.test
+58 −0 test/sql/alter/list/rename_column_in_struct.test
+128 −0 test/sql/alter/map/add_column_in_struct.test
+98 −0 test/sql/alter/map/drop_column_in_struct.test
+98 −0 test/sql/alter/map/rename_column_in_struct.test
+1 −1 test/sql/alter/struct/add_col_nested_struct.test
+1 −1 test/sql/alter/struct/add_col_struct.test
+1 −1 test/sql/alter/struct/drop_col_struct.test
+1 −1 test/sql/alter/struct/rename_col_struct.test
+45 −0 test/sql/attach/attach_lambda_view.test
+9 −0 test/sql/json/test_json_bool.test
+1 −1 test/sql/types/struct/remap_struct.test
+27 −6 tools/pythonpkg/src/python_replacement_scan.cpp
+0 −12 tools/pythonpkg/tests/fast/arrow/test_arrow_fetch.py
+5 −3 tools/shell/shell.cpp
15 changes: 9 additions & 6 deletions extension/httpfs/hffs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ static string ParseNextUrlFromLinkHeader(const string &link_header_content) {
HFFileHandle::~HFFileHandle() {};

unique_ptr<HTTPClient> HFFileHandle::CreateClient() {
return http_params.http_util->InitializeClient(http_params, parsed_url.endpoint);
return http_params.http_util.InitializeClient(http_params, parsed_url.endpoint);
}

string HuggingFaceFileSystem::ListHFRequest(ParsedHFUrl &url, HTTPFSParams &http_params, string &next_page_url,
Expand All @@ -69,7 +69,7 @@ string HuggingFaceFileSystem::ListHFRequest(ParsedHFUrl &url, HTTPFSParams &http
response << string(const_char_ptr_cast(data), data_length);
return true;
});
auto res = http_params.http_util->Request(get_request);
auto res = http_params.http_util.Request(get_request);
if (res->status != HTTPStatusCode::OK_200) {
throw IOException(res->GetError() + " error for HTTP GET to '" + next_page_url + "'");
}
Expand Down Expand Up @@ -205,7 +205,9 @@ vector<OpenFileInfo> HuggingFaceFileSystem::Glob(const string &path, FileOpener

FileOpenerInfo info;
info.file_path = path;
auto http_params = HTTPFSParams::ReadFrom(opener, info);
auto http_util = HTTPFSUtil::GetHTTPUtil(opener);
auto params = http_util->InitializeParameters(opener, info);
auto &http_params = params->Cast<HTTPFSParams>();
SetParams(http_params, path, opener);
auto http_state = HTTPState::TryGetState(opener).get();

Expand Down Expand Up @@ -278,10 +280,11 @@ unique_ptr<HTTPFileHandle> HuggingFaceFileSystem::CreateHandle(const OpenFileInf
FileOpenerInfo info;
info.file_path = file.path;

auto params = HTTPFSParams::ReadFrom(opener, info);
SetParams(params, file.path, opener);
auto http_util = HTTPFSUtil::GetHTTPUtil(opener);
auto params = http_util->InitializeParameters(opener, info);
SetParams(params->Cast<HTTPFSParams>(), file.path, opener);

return duckdb::make_uniq<HFFileHandle>(*this, std::move(parsed_url), file, flags, params);
return duckdb::make_uniq<HFFileHandle>(*this, std::move(parsed_url), file, flags, std::move(params));
}

void HuggingFaceFileSystem::SetParams(HTTPFSParams &params, const string &path, optional_ptr<FileOpener> opener) {
Expand Down
79 changes: 36 additions & 43 deletions extension/httpfs/httpfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

namespace duckdb {

shared_ptr<HTTPUtil> GetHTTPUtil(optional_ptr<FileOpener> opener) {
shared_ptr<HTTPUtil> HTTPFSUtil::GetHTTPUtil(optional_ptr<FileOpener> opener) {
if (opener) {
auto db = opener->TryGetDatabase();
if (db) {
Expand All @@ -32,65 +32,55 @@ shared_ptr<HTTPUtil> GetHTTPUtil(optional_ptr<FileOpener> opener) {
return make_shared_ptr<HTTPFSUtil>();
}

HTTPFSParams HTTPFSParams::ReadFrom(optional_ptr<FileOpener> opener, optional_ptr<FileOpenerInfo> info) {
HTTPFSParams result;
result.http_util = GetHTTPUtil(opener);
unique_ptr<HTTPParams> HTTPFSUtil::InitializeParameters(optional_ptr<FileOpener> opener, optional_ptr<FileOpenerInfo> info) {
auto result = make_uniq<HTTPFSParams>(*this);
result->Initialize(opener);

// No point in continueing without an opener
if (!opener) {
return result;
return std::move(result);
}

Value value;

// Setting lookups
FileOpener::TryGetCurrentSetting(opener, "http_timeout", result.timeout, info);
FileOpener::TryGetCurrentSetting(opener, "force_download", result.force_download, info);
FileOpener::TryGetCurrentSetting(opener, "http_retries", result.retries, info);
FileOpener::TryGetCurrentSetting(opener, "http_retry_wait_ms", result.retry_wait_ms, info);
FileOpener::TryGetCurrentSetting(opener, "http_retry_backoff", result.retry_backoff, info);
FileOpener::TryGetCurrentSetting(opener, "http_keep_alive", result.keep_alive, info);
FileOpener::TryGetCurrentSetting(opener, "enable_server_cert_verification", result.enable_server_cert_verification,
FileOpener::TryGetCurrentSetting(opener, "http_timeout", result->timeout, info);
FileOpener::TryGetCurrentSetting(opener, "force_download", result->force_download, info);
FileOpener::TryGetCurrentSetting(opener, "http_retries", result->retries, info);
FileOpener::TryGetCurrentSetting(opener, "http_retry_wait_ms", result->retry_wait_ms, info);
FileOpener::TryGetCurrentSetting(opener, "http_retry_backoff", result->retry_backoff, info);
FileOpener::TryGetCurrentSetting(opener, "http_keep_alive", result->keep_alive, info);
FileOpener::TryGetCurrentSetting(opener, "enable_server_cert_verification", result->enable_server_cert_verification,
info);
FileOpener::TryGetCurrentSetting(opener, "ca_cert_file", result.ca_cert_file, info);
FileOpener::TryGetCurrentSetting(opener, "hf_max_per_page", result.hf_max_per_page, info);
FileOpener::TryGetCurrentSetting(opener, "ca_cert_file", result->ca_cert_file, info);
FileOpener::TryGetCurrentSetting(opener, "hf_max_per_page", result->hf_max_per_page, info);

// HTTP Secret lookups
KeyValueSecretReader settings_reader(*opener, info, "http");

auto client_context = FileOpener::TryGetClientContext(opener);
if (client_context) {
result.Initialize(*client_context);
} else {
auto db = FileOpener::TryGetDatabase(opener);
if (db) {
result.Initialize(*db);
}
}

string proxy_setting;
if (settings_reader.TryGetSecretKey<string>("http_proxy", proxy_setting) && !proxy_setting.empty()) {
idx_t port;
string host;
HTTPUtil::ParseHTTPProxyHost(proxy_setting, host, port);
result.http_proxy = host;
result.http_proxy_port = port;
result->http_proxy = host;
result->http_proxy_port = port;
}
settings_reader.TryGetSecretKey<string>("http_proxy_username", result.http_proxy_username);
settings_reader.TryGetSecretKey<string>("http_proxy_password", result.http_proxy_password);
settings_reader.TryGetSecretKey<string>("bearer_token", result.bearer_token);
settings_reader.TryGetSecretKey<string>("http_proxy_username", result->http_proxy_username);
settings_reader.TryGetSecretKey<string>("http_proxy_password", result->http_proxy_password);
settings_reader.TryGetSecretKey<string>("bearer_token", result->bearer_token);

Value extra_headers;
if (settings_reader.TryGetSecretKey("extra_http_headers", extra_headers)) {
auto children = MapValue::GetChildren(extra_headers);
for (const auto &child : children) {
auto kv = StructValue::GetChildren(child);
D_ASSERT(kv.size() == 2);
result.extra_headers[kv[0].GetValue<string>()] = kv[1].GetValue<string>();
result->extra_headers[kv[0].GetValue<string>()] = kv[1].GetValue<string>();
}
}

return result;
return std::move(result);
}

unique_ptr<HTTPClient> HTTPClientCache::GetClient() {
Expand All @@ -113,7 +103,7 @@ unique_ptr<HTTPResponse> HTTPFileSystem::PostRequest(FileHandle &handle, string
string &buffer_out, char *buffer_in, idx_t buffer_in_len,
string params) {
auto &hfh = handle.Cast<HTTPFileHandle>();
auto &http_util = *hfh.http_params.http_util;
auto &http_util = hfh.http_params.http_util;
PostRequestInfo post_request(url, header_map, hfh.http_params, const_data_ptr_cast(buffer_in), buffer_in_len);
auto result = http_util.Request(post_request);
buffer_out = std::move(post_request.buffer_out);
Expand All @@ -123,7 +113,7 @@ unique_ptr<HTTPResponse> HTTPFileSystem::PostRequest(FileHandle &handle, string
unique_ptr<HTTPResponse> HTTPFileSystem::PutRequest(FileHandle &handle, string url, HTTPHeaders header_map,
char *buffer_in, idx_t buffer_in_len, string params) {
auto &hfh = handle.Cast<HTTPFileHandle>();
auto &http_util = *hfh.http_params.http_util;
auto &http_util = hfh.http_params.http_util;
string content_type = "application/octet-stream";
PutRequestInfo put_request(url, header_map, hfh.http_params, (const_data_ptr_t)buffer_in, buffer_in_len,
content_type);
Expand All @@ -132,7 +122,7 @@ unique_ptr<HTTPResponse> HTTPFileSystem::PutRequest(FileHandle &handle, string u

unique_ptr<HTTPResponse> HTTPFileSystem::HeadRequest(FileHandle &handle, string url, HTTPHeaders header_map) {
auto &hfh = handle.Cast<HTTPFileHandle>();
auto &http_util = *hfh.http_params.http_util;
auto &http_util = hfh.http_params.http_util;
auto http_client = hfh.GetClient();

HeadRequestInfo head_request(url, header_map, hfh.http_params);
Expand All @@ -144,7 +134,7 @@ unique_ptr<HTTPResponse> HTTPFileSystem::HeadRequest(FileHandle &handle, string

unique_ptr<HTTPResponse> HTTPFileSystem::DeleteRequest(FileHandle &handle, string url, HTTPHeaders header_map) {
auto &hfh = handle.Cast<HTTPFileHandle>();
auto &http_util = *hfh.http_params.http_util;
auto &http_util = hfh.http_params.http_util;
auto http_client = hfh.GetClient();
DeleteRequestInfo delete_request(url, header_map, hfh.http_params);
auto response = http_util.Request(delete_request, http_client);
Expand All @@ -166,7 +156,7 @@ HTTPException HTTPFileSystem::GetHTTPError(FileHandle &, const HTTPResponse &res

unique_ptr<HTTPResponse> HTTPFileSystem::GetRequest(FileHandle &handle, string url, HTTPHeaders header_map) {
auto &hfh = handle.Cast<HTTPFileHandle>();
auto &http_util = *hfh.http_params.http_util;
auto &http_util = hfh.http_params.http_util;

D_ASSERT(hfh.cached_file_handle);

Expand Down Expand Up @@ -215,7 +205,7 @@ unique_ptr<HTTPResponse> HTTPFileSystem::GetRequest(FileHandle &handle, string u
unique_ptr<HTTPResponse> HTTPFileSystem::GetRangeRequest(FileHandle &handle, string url, HTTPHeaders header_map,
idx_t file_offset, char *buffer_out, idx_t buffer_out_len) {
auto &hfh = handle.Cast<HTTPFileHandle>();
auto &http_util = *hfh.http_params.http_util;
auto &http_util = hfh.http_params.http_util;

// send the Range header to read only subset of file
string range_expr = "bytes=" + to_string(file_offset) + "-" + to_string(file_offset + buffer_out_len - 1);
Expand Down Expand Up @@ -286,8 +276,8 @@ void TimestampToTimeT(timestamp_t timestamp, time_t &result) {
}

HTTPFileHandle::HTTPFileHandle(FileSystem &fs, const OpenFileInfo &file, FileOpenFlags flags,
HTTPFSParams http_params_p)
: FileHandle(fs, file.path, flags), http_params(std::move(http_params_p)), flags(flags), length(0),
unique_ptr<HTTPParams> params_p)
: FileHandle(fs, file.path, flags), params(std::move(params_p)), http_params(params->Cast<HTTPFSParams>()), flags(flags), length(0),
buffer_available(0), buffer_idx(0), file_offset(0), buffer_start(0), buffer_end(0) {
// check if the handle has extended properties that can be set directly in the handle
// if we have these properties we don't need to do a head request to obtain them later
Expand Down Expand Up @@ -318,7 +308,9 @@ unique_ptr<HTTPFileHandle> HTTPFileSystem::CreateHandle(const OpenFileInfo &file

FileOpenerInfo info;
info.file_path = file.path;
auto params = HTTPFSParams::ReadFrom(opener, info);

auto http_util = HTTPFSUtil::GetHTTPUtil(opener);
auto params = http_util->InitializeParameters(opener, info);

auto secret_manager = FileOpener::TryGetSecretManager(opener);
auto transaction = FileOpener::TryGetCatalogTransaction(opener);
Expand All @@ -327,10 +319,11 @@ unique_ptr<HTTPFileHandle> HTTPFileSystem::CreateHandle(const OpenFileInfo &file

if (secret_match.HasMatch()) {
const auto &kv_secret = dynamic_cast<const KeyValueSecret &>(*secret_match.secret_entry->secret);
params.bearer_token = kv_secret.TryGetValue("token", true).ToString();
auto &httpfs_params = params->Cast<HTTPFSParams>();
httpfs_params.bearer_token = kv_secret.TryGetValue("token", true).ToString();
}
}
return duckdb::make_uniq<HTTPFileHandle>(*this, file, flags, params);
return duckdb::make_uniq<HTTPFileHandle>(*this, file, flags, std::move(params));
}

unique_ptr<FileHandle> HTTPFileSystem::OpenFileExtended(const OpenFileInfo &file, FileOpenFlags flags,
Expand Down Expand Up @@ -711,7 +704,7 @@ unique_ptr<HTTPClient> HTTPFileHandle::CreateClient() {
// Create a new client
string path_out, proto_host_port;
HTTPUtil::DecomposeURL(path, path_out, proto_host_port);
return http_params.http_util->InitializeClient(http_params, proto_host_port);
return http_params.http_util.InitializeClient(http_params, proto_host_port);
}

void HTTPFileHandle::StoreClient(unique_ptr<HTTPClient> client) {
Expand Down
133 changes: 2 additions & 131 deletions extension/httpfs/httpfs_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,137 +167,8 @@ unordered_map<string, string> HTTPFSUtil::ParseGetParameters(const string &text)
return result;
}

string HTTPFSUtil::GetStatusMessage(HTTPStatusCode status) {
switch (status) {
case HTTPStatusCode::Continue_100:
return "Continue";
case HTTPStatusCode::SwitchingProtocol_101:
return "Switching Protocol";
case HTTPStatusCode::Processing_102:
return "Processing";
case HTTPStatusCode::EarlyHints_103:
return "Early Hints";
case HTTPStatusCode::OK_200:
return "OK";
case HTTPStatusCode::Created_201:
return "Created";
case HTTPStatusCode::Accepted_202:
return "Accepted";
case HTTPStatusCode::NonAuthoritativeInformation_203:
return "Non-Authoritative Information";
case HTTPStatusCode::NoContent_204:
return "No Content";
case HTTPStatusCode::ResetContent_205:
return "Reset Content";
case HTTPStatusCode::PartialContent_206:
return "Partial Content";
case HTTPStatusCode::MultiStatus_207:
return "Multi-Status";
case HTTPStatusCode::AlreadyReported_208:
return "Already Reported";
case HTTPStatusCode::IMUsed_226:
return "IM Used";
case HTTPStatusCode::MultipleChoices_300:
return "Multiple Choices";
case HTTPStatusCode::MovedPermanently_301:
return "Moved Permanently";
case HTTPStatusCode::Found_302:
return "Found";
case HTTPStatusCode::SeeOther_303:
return "See Other";
case HTTPStatusCode::NotModified_304:
return "Not Modified";
case HTTPStatusCode::UseProxy_305:
return "Use Proxy";
case HTTPStatusCode::unused_306:
return "unused";
case HTTPStatusCode::TemporaryRedirect_307:
return "Temporary Redirect";
case HTTPStatusCode::PermanentRedirect_308:
return "Permanent Redirect";
case HTTPStatusCode::BadRequest_400:
return "Bad Request";
case HTTPStatusCode::Unauthorized_401:
return "Unauthorized";
case HTTPStatusCode::PaymentRequired_402:
return "Payment Required";
case HTTPStatusCode::Forbidden_403:
return "Forbidden";
case HTTPStatusCode::NotFound_404:
return "Not Found";
case HTTPStatusCode::MethodNotAllowed_405:
return "Method Not Allowed";
case HTTPStatusCode::NotAcceptable_406:
return "Not Acceptable";
case HTTPStatusCode::ProxyAuthenticationRequired_407:
return "Proxy Authentication Required";
case HTTPStatusCode::RequestTimeout_408:
return "Request Timeout";
case HTTPStatusCode::Conflict_409:
return "Conflict";
case HTTPStatusCode::Gone_410:
return "Gone";
case HTTPStatusCode::LengthRequired_411:
return "Length Required";
case HTTPStatusCode::PreconditionFailed_412:
return "Precondition Failed";
case HTTPStatusCode::PayloadTooLarge_413:
return "Payload Too Large";
case HTTPStatusCode::UriTooLong_414:
return "URI Too Long";
case HTTPStatusCode::UnsupportedMediaType_415:
return "Unsupported Media Type";
case HTTPStatusCode::RangeNotSatisfiable_416:
return "Range Not Satisfiable";
case HTTPStatusCode::ExpectationFailed_417:
return "Expectation Failed";
case HTTPStatusCode::ImATeapot_418:
return "I'm a teapot";
case HTTPStatusCode::MisdirectedRequest_421:
return "Misdirected Request";
case HTTPStatusCode::UnprocessableContent_422:
return "Unprocessable Content";
case HTTPStatusCode::Locked_423:
return "Locked";
case HTTPStatusCode::FailedDependency_424:
return "Failed Dependency";
case HTTPStatusCode::TooEarly_425:
return "Too Early";
case HTTPStatusCode::UpgradeRequired_426:
return "Upgrade Required";
case HTTPStatusCode::PreconditionRequired_428:
return "Precondition Required";
case HTTPStatusCode::TooManyRequests_429:
return "Too Many Requests";
case HTTPStatusCode::RequestHeaderFieldsTooLarge_431:
return "Request Header Fields Too Large";
case HTTPStatusCode::UnavailableForLegalReasons_451:
return "Unavailable For Legal Reasons";
case HTTPStatusCode::NotImplemented_501:
return "Not Implemented";
case HTTPStatusCode::BadGateway_502:
return "Bad Gateway";
case HTTPStatusCode::ServiceUnavailable_503:
return "Service Unavailable";
case HTTPStatusCode::GatewayTimeout_504:
return "Gateway Timeout";
case HTTPStatusCode::HttpVersionNotSupported_505:
return "HTTP Version Not Supported";
case HTTPStatusCode::VariantAlsoNegotiates_506:
return "Variant Also Negotiates";
case HTTPStatusCode::InsufficientStorage_507:
return "Insufficient Storage";
case HTTPStatusCode::LoopDetected_508:
return "Loop Detected";
case HTTPStatusCode::NotExtended_510:
return "Not Extended";
case HTTPStatusCode::NetworkAuthenticationRequired_511:
return "Network Authentication Required";

default:
case HTTPStatusCode::InternalServerError_500:
return "Internal Server Error";
}
string HTTPFSUtil::GetName() const {
return "HTTPFS";
}

} // namespace duckdb
4 changes: 2 additions & 2 deletions extension/httpfs/include/hffs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class HFFileHandle : public HTTPFileHandle {

public:
HFFileHandle(FileSystem &fs, ParsedHFUrl hf_url, const OpenFileInfo &file, FileOpenFlags flags,
const HTTPFSParams &http_params)
: HTTPFileHandle(fs, file, flags, http_params), parsed_url(std::move(hf_url)) {
unique_ptr<HTTPParams> http_params)
: HTTPFileHandle(fs, file, flags, std::move(http_params)), parsed_url(std::move(hf_url)) {
}
~HFFileHandle() override;

Expand Down
Loading
Loading