Skip to content
Closed
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
17 changes: 8 additions & 9 deletions .github/workflows/MainDistributionPipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,42 @@ concurrency:
jobs:
duckdb-stable-build:
name: Build extension binaries
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main # NOTE: manually update ref :(
uses: duckdb/extension-ci-tools/.github/workflows/_extension_distribution.yml@main
secrets: inherit # required for writing to vcpkg binary cache
with:
# Main config
extension_name: &ext_name delta
duckdb_version: &duckdb_ref v1.5.2
duckdb_version: &duckdb_ref main
ci_tools_version: &ci_tools_ref main
enable_rust: true
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl'
exclude_archs: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl"

# Config to write vcpkg binary cache
extra_toolchains: ${{ github.event_name != 'pull_request' && ';downgraded_aws_cli;python3;' || 'python3' }}
save_cache: ${{ github.event_name != 'pull_request' }}
vcpkg_binary_sources: ${{ github.event_name != 'pull_request' && vars.VCPKG_BINARY_SOURCES || '' }}
reduced_ci_mode: ${{ github.event_name == 'pull_request' && 'enabled' || 'disabled'}}


duckdb-stable-deploy:
name: Deploy extension binaries
needs: duckdb-stable-build
uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@main # NOTE: manually update ref :(
uses: duckdb/extension-ci-tools/.github/workflows/_extension_deploy.yml@main
secrets: inherit
with:
extension_name: *ext_name
duckdb_version: *duckdb_ref
ci_tools_version: *ci_tools_ref
exclude_archs: 'wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl'
exclude_archs: "wasm_mvp;wasm_eh;wasm_threads;windows_amd64_rtools;windows_amd64_mingw;linux_amd64_musl"
# deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
deploy_versioned: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }}
reduced_ci_mode: ${{ github.event_name == 'pull_request' && 'enabled' || 'disabled'}}

code-quality-check:
name: Code Quality Check
uses: duckdb/extension-ci-tools/.github/workflows/_extension_code_quality.yml@main # NOTE: manually update ref :(
uses: duckdb/extension-ci-tools/.github/workflows/_extension_code_quality.yml@main
with:
extension_name: *ext_name
duckdb_version: *duckdb_ref
ci_tools_version: *ci_tools_ref
format_checks: format
extra_toolchains: 'python3'
format_checks: format
extra_toolchains: "python3"
2 changes: 1 addition & 1 deletion duckdb
Submodule duckdb updated 9105 files
8 changes: 5 additions & 3 deletions src/delta_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,17 @@ static unique_ptr<Catalog> DeltaCatalogAttach(optional_ptr<StorageExtensionInfo>
string commit_fun_name = "__internal_delta_ccv2_commit_staged";

CatalogEntryRetriever retriever(context);
EntryLookupInfo lookup_info(CatalogType::TABLE_FUNCTION_ENTRY, commit_fun_name);
auto fun = retriever.GetEntry(res->parent_catalog_name, schema, lookup_info, OnEntryNotFound::RETURN_NULL);
EntryLookupInfo lookup_info(
CatalogType::TABLE_FUNCTION_ENTRY,
QualifiedName(Identifier(res->parent_catalog_name), Identifier(schema), Identifier(commit_fun_name)));
auto fun = retriever.GetEntry(lookup_info, OnEntryNotFound::RETURN_NULL);
if (!fun) {
throw InternalException("Parent catalog does not have a __internal_delta_ccv2_commit_staged function");
}
res->commit_function = fun->Cast<TableFunctionCatalogEntry>();
}

res->SetDefaultTable(DEFAULT_SCHEMA, res->GetInternalTableName());
res->SetDefaultTable(Identifier::DefaultSchema(), Identifier(res->GetInternalTableName()));

return std::move(res);
}
Expand Down
17 changes: 8 additions & 9 deletions src/delta_macros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,17 @@ void DeltaMacros::RegisterTableMacro(ExtensionLoader &loader, const string &name

auto func = make_uniq<TableMacroFunction>(std::move(node));
for (auto &param : params) {
func->parameters.push_back(make_uniq<ColumnRefExpression>(param));
func->parameters.push_back(make_uniq<ColumnRefExpression>(Identifier(param)));
}

for (auto &param : named_params) {
func->default_parameters[param.first] = make_uniq<ConstantExpression>(param.second);
func->default_parameters[Identifier(param.first)] = make_uniq<ConstantExpression>(Value(param.second));
}

CreateMacroInfo info(CatalogType::TABLE_MACRO_ENTRY);
info.schema = DEFAULT_SCHEMA;
info.name = name;
info.SetQualifiedName(
QualifiedName(info.GetQualifiedName().Catalog(), Identifier::DefaultSchema(), info.GetQualifiedName().Name()));
info.SetFunctionName(Identifier(name));
info.temporary = true;
info.internal = true;
info.macros.push_back(std::move(func));
Expand All @@ -76,11 +77,9 @@ void DeltaMacros::RegisterTableMacro(ExtensionLoader &loader, const string &name
}

static DefaultMacro delta_macros[] = {
{DEFAULT_SCHEMA,
"parse_delta_filter_logline",
{"x", nullptr},
{{nullptr, nullptr}},
"x::STRUCT(path VARCHAR, type VARCHAR, filters_before VARCHAR[], filters_after VARCHAR[], files_before BIGINT, "
{DEFAULT_SCHEMA, "parse_delta_filter_logline",
"(x) AS x::STRUCT(path VARCHAR, type VARCHAR, filters_before VARCHAR[], filters_after VARCHAR[], files_before "
"BIGINT, "
"files_after BIGINT)"},
};

Expand Down
Loading
Loading