Skip to content

Commit

Permalink
Merge pull request #90 from teaguesterling/issues/84
Browse files Browse the repository at this point in the history
Fix extension loading issue described in #84
  • Loading branch information
samansmink authored Dec 30, 2024
2 parents 53ea574 + ff7bb6e commit 02d8c83
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/iceberg_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
namespace duckdb {

static void LoadInternal(DatabaseInstance &instance) {
auto &config = DBConfig::GetConfig(instance);

config.AddExtensionOption(
"unsafe_enable_version_guessing",
"Enable globbing the filesystem (if possible) to find the latest version metadata. This could result in reading an uncommitted version.",
LogicalType::BOOLEAN,
Value::BOOLEAN(false)
);

// Iceberg Table Functions
for (auto &fun : IcebergFunctions::GetTableFunctions()) {
ExtensionUtil::RegisterFunction(instance, fun);
Expand All @@ -28,14 +37,6 @@ static void LoadInternal(DatabaseInstance &instance) {
}

void IcebergExtension::Load(DuckDB &db) {
auto &config = DBConfig::GetConfig(*db.instance);

config.AddExtensionOption(
"unsafe_enable_version_guessing",
"Enable globbing the filesystem (if possible) to find the latest version metadata. This could result in reading an uncommitted version.",
LogicalType::BOOLEAN,
Value::BOOLEAN(false)
);
LoadInternal(*db.instance);
}
std::string IcebergExtension::Name() {
Expand Down

0 comments on commit 02d8c83

Please sign in to comment.