Skip to content

Commit 2ff19c4

Browse files
Update vendored DuckDB sources to c8164851be
1 parent 943cc6d commit 2ff19c4

6 files changed

Lines changed: 22 additions & 12 deletions

File tree

src/duckdb/extension/core_functions/scalar/generic/current_setting.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ unique_ptr<FunctionData> CurrentSettingBind(ClientContext &context, ScalarFuncti
5050
auto key = StringUtil::Lower(StringValue::Get(key_val));
5151
Value val;
5252
if (!context.TryGetCurrentSetting(key, val)) {
53-
Catalog::AutoloadExtensionByConfigName(context, key);
53+
auto extension_name = Catalog::AutoloadExtensionByConfigName(context, key);
5454
// If autoloader didn't throw, the config is now available
55-
context.TryGetCurrentSetting(key, val);
55+
if (!context.TryGetCurrentSetting(key, val)) {
56+
throw InternalException("Extension %s did not provide the '%s' config setting", extension_name, key);
57+
}
5658
}
5759

5860
bound_function.return_type = val.type();

src/duckdb/src/catalog/catalog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,14 +534,14 @@ bool Catalog::TryAutoLoad(ClientContext &context, const string &original_name) n
534534
return false;
535535
}
536536

537-
void Catalog::AutoloadExtensionByConfigName(ClientContext &context, const string &configuration_name) {
537+
string Catalog::AutoloadExtensionByConfigName(ClientContext &context, const string &configuration_name) {
538538
#ifndef DUCKDB_DISABLE_EXTENSION_LOAD
539539
auto &dbconfig = DBConfig::GetConfig(context);
540540
if (dbconfig.options.autoload_known_extensions) {
541541
auto extension_name = ExtensionHelper::FindExtensionInEntries(configuration_name, EXTENSION_SETTINGS);
542542
if (ExtensionHelper::CanAutoloadExtension(extension_name)) {
543543
ExtensionHelper::AutoLoadExtension(context, extension_name);
544-
return;
544+
return extension_name;
545545
}
546546
}
547547
#endif

src/duckdb/src/execution/operator/helper/physical_reset.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ SourceResultType PhysicalReset::GetData(ExecutionContext &context, DataChunk &ch
3232
// check if this is an extra extension variable
3333
auto entry = config.extension_parameters.find(name);
3434
if (entry == config.extension_parameters.end()) {
35-
Catalog::AutoloadExtensionByConfigName(context.client, name);
35+
auto extension_name = Catalog::AutoloadExtensionByConfigName(context.client, name);
3636
entry = config.extension_parameters.find(name);
37-
D_ASSERT(entry != config.extension_parameters.end());
37+
if (entry == config.extension_parameters.end()) {
38+
// TODO: This is likely to harsh, but given this has a side-effect loaded the extension it should be
39+
// somehow brough back to users
40+
throw InternalException("Extension %s did not provide the '%s' config setting", extension_name, name);
41+
}
3842
}
3943
ResetExtensionVariable(context, config, entry->second);
4044
return SourceResultType::FINISHED;

src/duckdb/src/execution/operator/helper/physical_set.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ SourceResultType PhysicalSet::GetData(ExecutionContext &context, DataChunk &chun
3131
// check if this is an extra extension variable
3232
auto entry = config.extension_parameters.find(name);
3333
if (entry == config.extension_parameters.end()) {
34-
Catalog::AutoloadExtensionByConfigName(context.client, name);
34+
auto extension_name = Catalog::AutoloadExtensionByConfigName(context.client, name);
3535
entry = config.extension_parameters.find(name);
36-
D_ASSERT(entry != config.extension_parameters.end());
36+
if (entry == config.extension_parameters.end()) {
37+
// TODO: This is likely to harsh, but given this has a side-effect loaded the extension it should be
38+
// somehow brough back to users
39+
throw InternalException("Extension %s did not provide the '%s' config setting", extension_name, name);
40+
}
3741
}
3842
SetExtensionVariable(context.client, entry->second, name, scope, value);
3943
return SourceResultType::FINISHED;

src/duckdb/src/function/table/version/pragma_version.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#ifndef DUCKDB_PATCH_VERSION
2-
#define DUCKDB_PATCH_VERSION "3-dev113"
2+
#define DUCKDB_PATCH_VERSION "3-dev116"
33
#endif
44
#ifndef DUCKDB_MINOR_VERSION
55
#define DUCKDB_MINOR_VERSION 3
@@ -8,10 +8,10 @@
88
#define DUCKDB_MAJOR_VERSION 1
99
#endif
1010
#ifndef DUCKDB_VERSION
11-
#define DUCKDB_VERSION "v1.3.3-dev113"
11+
#define DUCKDB_VERSION "v1.3.3-dev116"
1212
#endif
1313
#ifndef DUCKDB_SOURCE_ID
14-
#define DUCKDB_SOURCE_ID "524b7f9c25"
14+
#define DUCKDB_SOURCE_ID "c8164851be"
1515
#endif
1616
#include "duckdb/function/table/system_functions.hpp"
1717
#include "duckdb/main/database.hpp"

src/duckdb/src/include/duckdb/catalog/catalog.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ class Catalog {
369369
static CatalogException UnrecognizedConfigurationError(ClientContext &context, const string &name);
370370

371371
//! Autoload the extension required for `configuration_name` or throw a CatalogException
372-
static void AutoloadExtensionByConfigName(ClientContext &context, const string &configuration_name);
372+
static string AutoloadExtensionByConfigName(ClientContext &context, const string &configuration_name);
373373
//! Autoload the extension required for `function_name` or throw a CatalogException
374374
static bool AutoLoadExtensionByCatalogEntry(DatabaseInstance &db, CatalogType type, const string &entry_name);
375375
DUCKDB_API static bool TryAutoLoad(ClientContext &context, const string &extension_name) noexcept;

0 commit comments

Comments
 (0)