Skip to content

Commit

Permalink
Merge pull request #52 from carlopi/main
Browse files Browse the repository at this point in the history
Absorb patch and bump to latest duckdb
  • Loading branch information
samansmink authored Apr 15, 2024
2 parents 5a6b6e7 + a7898bb commit d89423c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: duckdb/duckdb/.github/workflows/[email protected]
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:
Expand All @@ -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' }}
deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
2 changes: 1 addition & 1 deletion duckdb
Submodule duckdb updated 1020 files
2 changes: 1 addition & 1 deletion src/common/iceberg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ unique_ptr<SnapshotParseInfo> 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,
Expand Down
3 changes: 1 addition & 2 deletions src/common/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 0 additions & 8 deletions src/iceberg_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/iceberg_functions/iceberg_snapshots.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d89423c

Please sign in to comment.