-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update vendored sources to duckdb/duckdb@56619fa (#281)
* chore: Update vendored sources to duckdb/duckdb@56619fa Merge pull request duckdb/duckdb#13368 from samansmink/add-http-proxy * ext fix --------- Co-authored-by: krlmlr <krlmlr@users.noreply.github.com> Co-authored-by: Kirill Müller <kirill@cynkra.com>
- Loading branch information
1 parent
7847934
commit 722442c
Showing
24 changed files
with
14,183 additions
and
13,780 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
From ac8318dda4c948a4c1179f303854d91331bf9c2a Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?Kirill=20M=C3=BCller?= <kirill@cynkra.com> | ||
Date: Sun, 8 Sep 2024 16:22:50 +0200 | ||
Subject: [PATCH] ext fix | ||
|
||
--- | ||
src/duckdb/src/main/extension/extension_helper.cpp | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/src/duckdb/src/main/extension/extension_helper.cpp b/src/duckdb/src/main/extension/extension_helper.cpp | ||
index 0db77193..c821caed 100644 | ||
--- a/src/duckdb/src/main/extension/extension_helper.cpp | ||
+++ b/src/duckdb/src/main/extension/extension_helper.cpp | ||
@@ -232,7 +232,7 @@ bool ExtensionHelper::TryAutoLoadExtension(DatabaseInstance &instance, const str | ||
if (dbconfig.options.autoinstall_known_extensions) { | ||
auto autoinstall_repo = | ||
ExtensionRepository::GetRepositoryByUrl(dbconfig.options.autoinstall_extension_repo); | ||
- ExtensionHelper::InstallExtension(dbconfig, fs, extension_name, false, autoinstall_repo, false); | ||
+ ExtensionHelper::InstallExtension(instance, fs, extension_name, false, autoinstall_repo, false); | ||
} | ||
ExtensionHelper::LoadExternalExtension(instance, fs, extension_name); | ||
return true; | ||
-- | ||
2.43.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "duckdb/common/http_util.hpp" | ||
|
||
#include "duckdb/common/operator/cast_operators.hpp" | ||
#include "duckdb/common/string_util.hpp" | ||
|
||
namespace duckdb { | ||
|
||
void HTTPUtil::ParseHTTPProxyHost(string &proxy_value, string &hostname_out, idx_t &port_out, idx_t default_port) { | ||
auto proxy_split = StringUtil::Split(proxy_value, ":"); | ||
if (proxy_split.size() == 1) { | ||
hostname_out = proxy_split[0]; | ||
port_out = default_port; | ||
} else if (proxy_split.size() == 2) { | ||
idx_t port; | ||
if (!TryCast::Operation<string_t, idx_t>(proxy_split[1], port, false)) { | ||
throw InvalidInputException("Failed to parse port from http_proxy '%s'", proxy_value); | ||
} | ||
hostname_out = proxy_split[0]; | ||
port_out = port; | ||
} else { | ||
throw InvalidInputException("Failed to parse http_proxy '%s' into a host and port", proxy_value); | ||
} | ||
} | ||
|
||
} // namespace duckdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
//===----------------------------------------------------------------------===// | ||
// DuckDB | ||
// | ||
// duckdb/common/http_util.hpp | ||
// | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "duckdb/common/types.hpp" | ||
|
||
namespace duckdb { | ||
|
||
class HTTPUtil { | ||
public: | ||
static void ParseHTTPProxyHost(string &proxy_value, string &hostname_out, idx_t &port_out, idx_t default_port = 80); | ||
}; | ||
} // namespace duckdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
src/duckdb/src/include/duckdb/main/secret/default_secrets.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
//===----------------------------------------------------------------------===// | ||
// DuckDB | ||
// | ||
// duckdb/main/secret/default_secrets.hpp | ||
// | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#pragma once | ||
|
||
#include "duckdb/common/common.hpp" | ||
|
||
namespace duckdb { | ||
class DatabaseInstance; | ||
class ClientContext; | ||
class BaseSecret; | ||
struct CreateSecretInput; | ||
class SecretManager; | ||
struct SecretType; | ||
class CreateSecretFunction; | ||
|
||
struct CreateHTTPSecretFunctions { | ||
public: | ||
//! Get the default secret types | ||
static vector<SecretType> GetDefaultSecretTypes(); | ||
//! Get the default secret functions | ||
static vector<CreateSecretFunction> GetDefaultSecretFunctions(); | ||
|
||
protected: | ||
//! HTTP secret CONFIG provider | ||
static unique_ptr<BaseSecret> CreateHTTPSecretFromConfig(ClientContext &context, CreateSecretInput &input); | ||
//! HTTP secret ENV provider | ||
static unique_ptr<BaseSecret> CreateHTTPSecretFromEnv(ClientContext &context, CreateSecretInput &input); | ||
}; | ||
|
||
} // namespace duckdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.