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
8 changes: 4 additions & 4 deletions src/duckdb/generated_extension_loader_package_build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int32_t duckdb_extension_core_functions_describe(duckdb_extension_descriptor *de
descriptor->version = 1;
descriptor->name = "core_functions";
descriptor->extension_version = EXT_VERSION_CORE_FUNCTIONS;
descriptor->api_version = "v2.0.1-alpha56460";
descriptor->api_version = "v2.0.1-alpha56598";
descriptor->entry_cpp = (void (*)(void))core_functions_duckdb_cpp_init;
return 0;
}
Expand Down Expand Up @@ -78,7 +78,7 @@ int32_t duckdb_extension_parquet_describe(duckdb_extension_descriptor *descripto
descriptor->version = 1;
descriptor->name = "parquet";
descriptor->extension_version = EXT_VERSION_PARQUET;
descriptor->api_version = "v2.0.1-alpha56460";
descriptor->api_version = "v2.0.1-alpha56598";
descriptor->entry_cpp = (void (*)(void))parquet_duckdb_cpp_init;
return 0;
}
Expand Down Expand Up @@ -111,7 +111,7 @@ int32_t duckdb_extension_icu_describe(duckdb_extension_descriptor *descriptor) {
descriptor->version = 1;
descriptor->name = "icu";
descriptor->extension_version = EXT_VERSION_ICU;
descriptor->api_version = "v2.0.1-alpha56460";
descriptor->api_version = "v2.0.1-alpha56598";
descriptor->entry_cpp = (void (*)(void))icu_duckdb_cpp_init;
return 0;
}
Expand Down Expand Up @@ -144,7 +144,7 @@ int32_t duckdb_extension_json_describe(duckdb_extension_descriptor *descriptor)
descriptor->version = 1;
descriptor->name = "json";
descriptor->extension_version = EXT_VERSION_JSON;
descriptor->api_version = "v2.0.1-alpha56460";
descriptor->api_version = "v2.0.1-alpha56598";
descriptor->entry_cpp = (void (*)(void))json_duckdb_cpp_init;
return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions src/duckdb/src/function/table/version/pragma_version.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DUCKDB_PATCH_VERSION
#define DUCKDB_PATCH_VERSION "1-alpha56460"
#define DUCKDB_PATCH_VERSION "1-alpha56598"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 0
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 2
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v2.0.1-alpha56460"
#define DUCKDB_VERSION "v2.0.1-alpha56598"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "90dcc2834c"
#define DUCKDB_SOURCE_ID "bfd838c07d"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
30 changes: 19 additions & 11 deletions src/duckdb/src/include/duckdb/main/extension_entries.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"@>", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY},
{"^", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY},
{"^@", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY},
{"__aws__cloudformation__quack_on_ec2__create", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__cloudformation__quack_on_ec2__destroy", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__cloudformation__quack_on_ec2__list", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__cloudformation__quack_on_ec2__resolve", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__cloudformation__quack_on_ec2__status", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__cloudformation__stack__create", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__cloudformation__stack__destroy", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__cloudformation__stack__list", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__cloudformation__stack__resolve", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__cloudformation__stack__status", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__expired", "aws", CatalogType::SCALAR_FUNCTION_ENTRY},
{"__aws__s3__bucket__create", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
{"__aws__s3__bucket__destroy", "aws", CatalogType::TABLE_FUNCTION_ENTRY},
Expand Down Expand Up @@ -351,6 +351,7 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"ducklake_table_deletions", "ducklake", CatalogType::TABLE_FUNCTION_ENTRY},
{"ducklake_table_info", "ducklake", CatalogType::TABLE_FUNCTION_ENTRY},
{"ducklake_table_insertions", "ducklake", CatalogType::TABLE_FUNCTION_ENTRY},
{"ducklake_unreadable_macro_default", "ducklake", CatalogType::SCALAR_FUNCTION_ENTRY},
{"editdist3", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY},
{"element_at", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY},
{"encode", "core_functions", CatalogType::SCALAR_FUNCTION_ENTRY},
Expand Down Expand Up @@ -383,6 +384,8 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"from_json", "json", CatalogType::SCALAR_FUNCTION_ENTRY},
{"from_json_strict", "json", CatalogType::SCALAR_FUNCTION_ENTRY},
{"fsum", "core_functions", CatalogType::AGGREGATE_FUNCTION_ENTRY},
{"fts_analyze_pattern", "fts", CatalogType::SCALAR_FUNCTION_ENTRY},
{"fts_near_tf", "fts", CatalogType::SCALAR_FUNCTION_ENTRY},
{"fts_tokenize_opensearch_standard", "fts", CatalogType::SCALAR_FUNCTION_ENTRY},
{"fuzz_all_functions", "sqlsmith", CatalogType::TABLE_FUNCTION_ENTRY},
{"fuzzyduck", "sqlsmith", CatalogType::TABLE_FUNCTION_ENTRY},
Expand Down Expand Up @@ -424,6 +427,7 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"html_unescape", "inet", CatalogType::SCALAR_FUNCTION_ENTRY},
{"iceberg_bucket", "iceberg", CatalogType::SCALAR_FUNCTION_ENTRY},
{"iceberg_column_stats", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_expire_snapshots", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_files", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_history", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_load_table_response", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
Expand All @@ -439,6 +443,7 @@ static constexpr ExtensionFunctionEntry EXTENSION_FUNCTIONS[] = {
{"iceberg_scan_plan", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_scan_tasks", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_schema_properties", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_schemas", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_snapshots", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_table_properties", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
{"iceberg_to_ducklake", "iceberg", CatalogType::TABLE_FUNCTION_ENTRY},
Expand Down Expand Up @@ -1465,12 +1470,14 @@ static constexpr ExtensionEntry EXTENSION_SETTINGS[] = {
{"httpfs_connection_caching", "httpfs"},
{"httpfs_enable_credential_refresh", "httpfs"},
{"iceberg_default_format_version", "iceberg"},
{"iceberg_enable_manifest_cache", "iceberg"},
{"iceberg_enable_multi_file_scan_tasks", "iceberg"},
{"iceberg_enable_scan_serialization", "iceberg"},
{"iceberg_equality_delete_fast_filter", "iceberg"},
{"iceberg_logging_post_body_truncate_limit", "iceberg"},
{"iceberg_max_reserved_manifest_entries", "iceberg"},
{"iceberg_metadata_log_clock_skew_ms", "iceberg"},
{"iceberg_store_written_files", "iceberg"},
{"iceberg_test_force_token_expiry", "iceberg"},
{"iceberg_unsafe_skip_puffin_verification", "iceberg"},
{"iceberg_use_metadata_log", "iceberg"},
Expand Down Expand Up @@ -1599,10 +1606,10 @@ static constexpr ExtensionEntry EXTENSION_SECRET_TYPES[] = {

// Resource types registered by extensions: CREATE/REGISTER EXTERNAL RESOURCE '<type>' autoloads the extension
static constexpr ExtensionEntry EXTENSION_EXTERNAL_RESOURCE_TYPES[] = {
{"aws:cloudformation:quack-on-ec2", "aws"},
{"aws:s3:bucket", "aws"},
{"aws:s3tables:bucket", "aws"},
{"aws:system-table", "aws"},
{"aws.cloudformation.stack", "aws"},
{"aws.s3.bucket", "aws"},
{"aws.s3tables.bucket", "aws"},
{"aws.system-table", "aws"},
}; // END_OF_EXTENSION_EXTERNAL_RESOURCE_TYPES

// Note: these are currently hardcoded in scripts/generate_extensions_function.py
Expand Down Expand Up @@ -1702,8 +1709,9 @@ static constexpr ExtensionEntry EXTENSION_SECRET_PROVIDERS[] = {
// Note: these are currently hardcoded in scripts/generate_extensions_function.py
// TODO: automate by passing though to script via duckdb
static constexpr ExtensionEntry EXTENSION_LOG_TYPES[] = {
{"DeltaKernel", "delta"}, {"DuckLakeMetadata", "ducklake"}, {"HTTPFSInfo", "httpfs"},
{"Iceberg", "iceberg"}, {"PostgresQueryLog", "postgres_scanner"}, {"Quack", "quack"},
{"DeltaKernel", "delta"}, {"DuckLakeMetadata", "ducklake"}, {"HTTPFSInfo", "httpfs"},
{"Iceberg", "iceberg"}, {"IcebergDataFileWritten", "iceberg"}, {"PostgresQueryLog", "postgres_scanner"},
{"Quack", "quack"},
}; // END_OF_EXTENSION_LOG_TYPES

static constexpr const char *AUTOLOADABLE_EXTENSIONS[] = {"autocomplete",
Expand Down
3 changes: 0 additions & 3 deletions src/duckdb/src/include/duckdb/main/secret/secret_manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ class SecretManager {
//! Static Helper Functions
DUCKDB_API static SecretManager &Get(ClientContext &context);
DUCKDB_API static SecretManager &Get(DatabaseInstance &db);
//! Throws when enable_external_access is false; type and provider only decorate the message and may be empty
DUCKDB_API static void ThrowIfSecretCreationDisabled(DatabaseInstance &db, const Identifier &type,
const Identifier &provider);

// Initialize the secret manager with the DB instance
DUCKDB_API void Initialize(DatabaseInstance &db);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1403,7 +1403,7 @@ const unsigned char INLINED_PEG_GRAMMAR[] = {
35, 32, 83, 104, 111, 119, 69, 120, 116, 101, 114, 110, 97, 108, 82, 101, 115, 111, 117, 114, 99, 101, 84, 121, 112, 101, 115, 32, 99, 111, 109, 101, 32, 102, 105, 114, 115, 116, 58, 32, 34, 83, 72, 79, 87, 32, 65, 76, 76, 34, 32, 97, 108, 111, 110, 101, 32, 105, 115, 32, 83, 104, 111, 119, 65, 108, 108, 84, 97, 98, 108, 101, 115, 44, 32, 97, 110, 100, 32, 34, 83, 72, 79, 87, 32, 60, 110, 97, 109, 101, 62, 34, 32, 105, 115, 32, 83, 104, 111, 119, 66, 121, 78, 97, 109, 101, 44, 32, 97, 110, 100, 10,
35, 32, 110, 101, 105, 116, 104, 101, 114, 32, 99, 97, 110, 32, 98, 101, 32, 114, 101, 116, 114, 105, 101, 100, 32, 111, 110, 99, 101, 32, 109, 97, 116, 99, 104, 101, 100, 46, 10,
83, 104, 111, 119, 69, 120, 116, 101, 114, 110, 97, 108, 82, 101, 115, 111, 117, 114, 99, 101, 115, 32, 60, 45, 32, 83, 104, 111, 119, 82, 117, 108, 101, 32, 39, 65, 76, 76, 39, 63, 32, 39, 69, 88, 84, 69, 82, 78, 65, 76, 39, 32, 39, 82, 69, 83, 79, 85, 82, 67, 69, 83, 39, 32, 83, 104, 111, 119, 69, 120, 116, 101, 114, 110, 97, 108, 82, 101, 115, 111, 117, 114, 99, 101, 115, 84, 121, 112, 101, 63, 10,
35, 32, 34, 87, 73, 84, 72, 32, 84, 89, 80, 69, 32, 39, 97, 119, 115, 58, 115, 51, 116, 97, 98, 108, 101, 115, 58, 116, 97, 98, 108, 101, 45, 98, 117, 99, 107, 101, 116, 39, 34, 32, 114, 101, 115, 116, 114, 105, 99, 116, 115, 32, 116, 104, 101, 32, 108, 105, 115, 116, 105, 110, 103, 32, 40, 97, 110, 100, 32, 116, 104, 101, 32, 100, 105, 115, 99, 111, 118, 101, 114, 121, 41, 32, 116, 111, 32, 111, 110, 101, 32, 116, 121, 112, 101, 59, 32, 97, 32, 98, 97, 114, 101, 32, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 10,
35, 32, 34, 87, 73, 84, 72, 32, 84, 89, 80, 69, 32, 39, 97, 119, 115, 46, 115, 51, 116, 97, 98, 108, 101, 115, 46, 98, 117, 99, 107, 101, 116, 39, 34, 32, 114, 101, 115, 116, 114, 105, 99, 116, 115, 32, 116, 104, 101, 32, 108, 105, 115, 116, 105, 110, 103, 32, 40, 97, 110, 100, 32, 116, 104, 101, 32, 100, 105, 115, 99, 111, 118, 101, 114, 121, 41, 32, 116, 111, 32, 111, 110, 101, 32, 116, 121, 112, 101, 59, 32, 97, 32, 98, 97, 114, 101, 32, 105, 100, 101, 110, 116, 105, 102, 105, 101, 114, 10,
35, 32, 105, 115, 32, 112, 97, 115, 115, 101, 100, 32, 116, 104, 114, 111, 117, 103, 104, 32, 97, 115, 32, 116, 104, 101, 32, 116, 121, 112, 101, 32, 110, 97, 109, 101, 32, 97, 115, 32, 119, 101, 108, 108, 46, 10,
83, 104, 111, 119, 69, 120, 116, 101, 114, 110, 97, 108, 82, 101, 115, 111, 117, 114, 99, 101, 115, 84, 121, 112, 101, 32, 60, 45, 32, 39, 87, 73, 84, 72, 39, 32, 39, 84, 89, 80, 69, 39, 32, 67, 111, 108, 73, 100, 79, 114, 83, 116, 114, 105, 110, 103, 10,
35, 32, 34, 83, 72, 79, 87, 32, 69, 88, 84, 69, 82, 78, 65, 76, 32, 82, 69, 83, 79, 85, 82, 67, 69, 32, 84, 89, 80, 69, 83, 34, 32, 105, 115, 32, 97, 32, 113, 117, 101, 114, 121, 32, 111, 118, 101, 114, 32, 100, 117, 99, 107, 100, 98, 95, 101, 120, 116, 101, 114, 110, 97, 108, 95, 114, 101, 115, 111, 117, 114, 99, 101, 95, 116, 121, 112, 101, 115, 44, 32, 115, 111, 32, 105, 116, 32, 119, 111, 114, 107, 115, 32, 97, 115, 32, 97, 32, 115, 117, 98, 113, 117, 101, 114, 121, 32, 116, 111, 111, 46, 10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,24 @@ inline idx_t TranslateSelection(idx_t count, optional_ptr<const SelectionVector>
}
return local_true_count;
}
if (true_sel) {
for (idx_t i = 0; i < local_true_count; i++) {
true_sel->set_index(i, input_sel->get_index(local_true_sel.get_index(i)));
}
}
if (false_sel) {
idx_t false_count = 0;
idx_t true_offset = 0;
for (idx_t i = 0; i < count; i++) {
// Read both indices before either output can overwrite them.
auto row = input_sel->get_index(i);
if (true_offset < local_true_count && local_true_sel.get_index(true_offset) == i) {
if (true_sel) {
true_sel->set_index(true_offset, row);
}
true_offset++;
continue;
} else {
false_sel->set_index(false_count++, row);
}
false_sel->set_index(false_count++, input_sel->get_index(i));
}
} else if (true_sel) {
for (idx_t i = 0; i < local_true_count; i++) {
true_sel->set_index(i, input_sel->get_index(local_true_sel.get_index(i)));
}
}
return local_true_count;
Expand Down
30 changes: 17 additions & 13 deletions src/duckdb/src/main/secret/default_secrets.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#include "duckdb/main/secret/default_secrets.hpp"

#include "duckdb/common/string_util.hpp"
#include "duckdb/main/client_context.hpp"
#include "duckdb/main/os_util.hpp"
#include "duckdb/main/secret/secret_manager.hpp"

namespace duckdb {
Expand Down Expand Up @@ -62,22 +58,30 @@ vector<CreateSecretFunction> CreateHTTPSecretFunctions::GetDefaultSecretFunction
return result;
}

//! Reads a proxy setting from the process environment into the secret, trying the lowercase name before the uppercase
static void TrySetValueFromEnv(OSUtil &os_util, KeyValueSecret &secret, const string &name) {
string value;
if (os_util.GetEnv(name, value) || os_util.GetEnv(StringUtil::Upper(name), value)) {
secret.secret_map[Identifier(name)] = Value(value);
static const char *TryGetEnv(const char *name) {
const char *res = std::getenv(name);
if (res) {
return res;
}
return std::getenv(StringUtil::Upper(name).c_str());
}

unique_ptr<BaseSecret> CreateHTTPSecretFunctions::CreateHTTPSecretFromEnv(ClientContext &context,
CreateSecretInput &input) {
auto secret = make_uniq<KeyValueSecret>(input.scope, input.type, input.provider, input.name);

auto &os_util = OSUtil::Get(*context.db);
TrySetValueFromEnv(os_util, *secret, "http_proxy");
TrySetValueFromEnv(os_util, *secret, "http_proxy_password");
TrySetValueFromEnv(os_util, *secret, "http_proxy_username");
auto http_proxy = TryGetEnv("http_proxy");
if (http_proxy) {
secret->secret_map["http_proxy"] = Value(http_proxy);
}
auto http_proxy_password = TryGetEnv("http_proxy_password");
if (http_proxy_password) {
secret->secret_map["http_proxy_password"] = Value(http_proxy_password);
}
auto http_proxy_username = TryGetEnv("http_proxy_username");
if (http_proxy_username) {
secret->secret_map["http_proxy_username"] = Value(http_proxy_username);
}

// Allow overwrites
secret->TrySetValue("verify_ssl", input);
Expand Down
17 changes: 0 additions & 17 deletions src/duckdb/src/main/secret/secret_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "duckdb/main/extension_helper.hpp"
#include "duckdb/main/secret/secret_storage.hpp"
#include "duckdb/main/secret/default_secrets.hpp"
#include "duckdb/main/settings.hpp"
#include "duckdb/parser/parsed_data/create_secret_info.hpp"
#include "duckdb/parser/statement/create_statement.hpp"
#include "duckdb/planner/operator/logical_create_secret.hpp"
Expand Down Expand Up @@ -256,24 +255,9 @@ optional_ptr<CreateSecretFunction> SecretManager::LookupFunctionInternal(const I
return nullptr;
}

//! Secret providers read environment variables, files and credential endpoints: none of that without external access
void SecretManager::ThrowIfSecretCreationDisabled(DatabaseInstance &db, const Identifier &type,
const Identifier &provider) {
if (Settings::Get<EnableExternalAccessSetting>(db)) {
return;
}
string what = "Creating secrets is disabled when enable_external_access is false";
if (type.empty()) {
throw PermissionException(what);
}
string provider_string = provider.empty() ? "" : StringUtil::Format(", provider %s", provider);
throw PermissionException("%s (secret type %s%s)", what, type, provider_string);
}

unique_ptr<SecretEntry> SecretManager::CreateSecret(ClientContext &context, const CreateSecretInput &input) {
// Note that a context is required for CreateSecret, as the CreateSecretFunction expects one
auto transaction = CatalogTransaction::GetSystemCatalogTransaction(context);
ThrowIfSecretCreationDisabled(*transaction.db, input.type, input.provider);
InitializeSecrets(transaction);

// Make a copy to set the provider to default if necessary
Expand Down Expand Up @@ -303,7 +287,6 @@ unique_ptr<SecretEntry> SecretManager::CreateSecret(ClientContext &context, cons
}

BoundStatement SecretManager::BindCreateSecret(CatalogTransaction transaction, CreateSecretInput &info) {
ThrowIfSecretCreationDisabled(*transaction.db, info.type, info.provider);
if (info.persist_type == SecretPersistType::TRANSACTION || info.storage_type == TRANSACTION_STORAGE_NAME) {
throw BinderException("Transaction-scoped secrets cannot be created through SQL");
}
Expand Down
20 changes: 0 additions & 20 deletions src/duckdb/src/planner/binder/statement/bind_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "duckdb/parser/constraints/list.hpp"
#include "duckdb/parser/constraints/unique_constraint.hpp"
#include "duckdb/common/string_util.hpp"
#include "duckdb/parser/expression/columnref_expression.hpp"
#include "duckdb/parser/expression/constant_expression.hpp"
#include "duckdb/parser/expression/function_expression.hpp"
#include "duckdb/parser/expression/subquery_expression.hpp"
Expand Down Expand Up @@ -857,20 +856,6 @@ unique_ptr<LogicalOperator> DuckCatalog::BindCreateIndex(Binder &binder, CreateS
return index_binder.BindCreateIndex(binder.context, std::move(create_index_info), table, std::move(plan), nullptr);
}

//! The literal of a CREATE SECRET type or provider without evaluating it, empty when it is not a plain literal
static string SecretLiteral(const unique_ptr<ParsedExpression> &expr) {
if (!expr) {
return string();
}
if (expr->GetExpressionType() == ExpressionType::VALUE_CONSTANT) {
return StringUtil::Lower(expr->Cast<ConstantExpression>().GetLiteral().ToValue().ToString());
}
if (expr->GetExpressionType() == ExpressionType::COLUMN_REF) {
return StringUtil::Lower(expr->Cast<ColumnRefExpression>().GetName().GetIdentifierName());
}
return string();
}

BoundStatement Binder::Bind(CreateStatement &stmt) {
BoundStatement result;
result.names = {"Count"};
Expand Down Expand Up @@ -1045,11 +1030,6 @@ BoundStatement Binder::Bind(CreateStatement &stmt) {

auto &info = stmt.info->Cast<CreateSecretInfo>();

// Refuse before any option expression runs, so a refused statement has no side effects
SecretManager::ThrowIfSecretCreationDisabled(DatabaseInstance::GetDatabase(context),
Identifier(SecretLiteral(info.type)),
Identifier(SecretLiteral(info.provider)));

// We need to execute all expressions in the CreateSecretInfo to construct a CreateSecretInput
ConstantBinder default_binder(*this, context, "Secret Parameter");

Expand Down
Loading