From 2c148cff275ac33e02eed2778b1ab74c1da18e68 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Fri, 12 Apr 2024 23:46:45 +0200 Subject: [PATCH 1/2] Apply duckdb's patch --- src/common/iceberg.cpp | 2 +- src/common/utils.cpp | 3 +-- src/iceberg_extension.cpp | 8 -------- src/iceberg_functions/iceberg_snapshots.cpp | 2 +- 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/common/iceberg.cpp b/src/common/iceberg.cpp index ba2f284..db2930c 100644 --- a/src/common/iceberg.cpp +++ b/src/common/iceberg.cpp @@ -127,7 +127,7 @@ unique_ptr IcebergSnapshot::GetParseInfo(const string &path, parse_info->doc = doc; parse_info->document = std::move(metadata_json); - return std::move(parse_info); + return parse_info; } IcebergSnapshot IcebergSnapshot::GetLatestSnapshot(const string &path, FileSystem &fs, diff --git a/src/common/utils.cpp b/src/common/utils.cpp index 230a3c7..dfeebcf 100644 --- a/src/common/utils.cpp +++ b/src/common/utils.cpp @@ -7,8 +7,7 @@ namespace duckdb { string IcebergUtils::FileToString(const string &path, FileSystem &fs) { - auto handle = - fs.OpenFile(path, FileFlags::FILE_FLAGS_READ, FileSystem::DEFAULT_LOCK, FileSystem::DEFAULT_COMPRESSION); + auto handle = fs.OpenFile(path, FileFlags::FILE_FLAGS_READ); auto file_size = handle->GetFileSize(); string ret_val(file_size, ' '); handle->Read((char *)ret_val.c_str(), file_size); diff --git a/src/iceberg_extension.cpp b/src/iceberg_extension.cpp index 0e59fdc..895b79d 100644 --- a/src/iceberg_extension.cpp +++ b/src/iceberg_extension.cpp @@ -16,12 +16,6 @@ namespace duckdb { static void LoadInternal(DatabaseInstance &instance) { - Connection con(instance); - con.BeginTransaction(); - auto &context = *con.context; - - auto &catalog = Catalog::GetSystemCatalog(*con.context); - // Iceberg Table Functions for (auto &fun : IcebergFunctions::GetTableFunctions()) { ExtensionUtil::RegisterFunction(instance, fun); @@ -31,8 +25,6 @@ static void LoadInternal(DatabaseInstance &instance) { for (auto &fun : IcebergFunctions::GetScalarFunctions()) { ExtensionUtil::RegisterFunction(instance, fun); } - - con.Commit(); } void IcebergExtension::Load(DuckDB &db) { diff --git a/src/iceberg_functions/iceberg_snapshots.cpp b/src/iceberg_functions/iceberg_snapshots.cpp index ec76b42..4dd5dd7 100644 --- a/src/iceberg_functions/iceberg_snapshots.cpp +++ b/src/iceberg_functions/iceberg_snapshots.cpp @@ -117,7 +117,7 @@ TableFunctionSet IcebergFunctions::GetIcebergSnapshotsFunction() { table_function.named_parameters["metadata_compression_codec"] = LogicalType::VARCHAR; table_function.named_parameters["skip_schema_inference"] = LogicalType::BOOLEAN; function_set.AddFunction(table_function); - return std::move(function_set); + return function_set; } } // namespace duckdb From a7898bb4df1aa7c2cfa59312a852253f127bb737 Mon Sep 17 00:00:00 2001 From: Carlo Piovesan Date: Fri, 12 Apr 2024 23:49:07 +0200 Subject: [PATCH 2/2] Bump duckdb to latest main --- .github/workflows/MainDistributionPipeline.yml | 6 +++--- duckdb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/MainDistributionPipeline.yml b/.github/workflows/MainDistributionPipeline.yml index f4e782d..991ca70 100644 --- a/.github/workflows/MainDistributionPipeline.yml +++ b/.github/workflows/MainDistributionPipeline.yml @@ -17,7 +17,7 @@ jobs: uses: duckdb/duckdb/.github/workflows/_extension_distribution.yml@v0.10.1 with: extension_name: iceberg - duckdb_version: 'v0.10.1' + duckdb_version: main exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools' duckdb-stable-deploy: @@ -27,6 +27,6 @@ jobs: secrets: inherit with: extension_name: iceberg - duckdb_version: 'v0.10.1' + duckdb_version: 'main' exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools' - deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }} \ No newline at end of file + deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }} diff --git a/duckdb b/duckdb index 4a89d97..e11b856 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit 4a89d97db8a5a23a15f3025c8d2d2885337c2637 +Subproject commit e11b856be74be8cd954218b27d47c5e2af0b25a4