Skip to content

feat: add coldfront.drop_iceberg_table for decoupled and tiered tables - #62

Merged
vyruss merged 2 commits into
mainfrom
feat/drop-iceberg-table
Jul 28, 2026
Merged

feat: add coldfront.drop_iceberg_table for decoupled and tiered tables#62
vyruss merged 2 commits into
mainfrom
feat/drop-iceberg-table

Conversation

@vyruss

@vyruss vyruss commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Add a function to drop the Iceberg table behind the registered relation, in either mode, with an explicit purge decision and no default.

Decoupled: nothing remains.
Tiered: the cold tier goes and the hot table returns under its own name.
Plain DROP TABLE / DROP VIEW stays blocked.

Caveat: Table protection needs to be manually enabled for the table in Lakekeeper to prevent purging.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@vyruss, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 18efb97a-2f0e-4abe-88f5-32b5f9a96915

📥 Commits

Reviewing files that changed from the base of the PR and between 6cc9ecd and b7d2909.

⛔ Files ignored due to path filters (1)
  • extension/coldfront/test/expected/drop_iceberg_table.out is excluded by !**/*.out
📒 Files selected for processing (9)
  • README.md
  • ci/journey.sh
  • docs/architecture.md
  • docs/architecture_decoupled.md
  • docs/index.md
  • docs/usage.md
  • extension/coldfront/Makefile
  • extension/coldfront/coldfront--1.0.sql
  • extension/coldfront/test/sql/drop_iceberg_table.sql
📝 Walkthrough

Walkthrough

Changes

Adds coldfront.drop_iceberg_table() with purge-aware Iceberg deletion, PostgreSQL and tiered-table teardown, regression and end-to-end tests, and documentation for both operating modes.

Iceberg drop implementation

Layer / File(s) Summary
Drop and teardown workflow
extension/coldfront/coldfront--1.0.sql
Adds SQL helpers for purge-aware DuckDB drops, PostgreSQL unregistration, tiered-table restoration, validation, claims, and execution.

Validation and integration

Layer / File(s) Summary
Regression and journey coverage
extension/coldfront/test/sql/drop_iceberg_table.sql, extension/coldfront/Makefile, ci/journey.sh
Tests decoupled and tiered cleanup, purge variants, identifier quoting, catalog state, PostgreSQL state, and Lakekeeper object behavior.

Documentation

Layer / File(s) Summary
Supported drop workflow
README.md, docs/index.md, docs/usage.md, docs/architecture.md, docs/architecture_decoupled.md
Documents the function, purge semantics, mode-specific teardown, blocked direct drops, and asynchronous cleanup.

Estimated code review effort: 4 (Complex) | ~45 minutes

Suggested reviewers: dpage

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly names the new drop_iceberg_table feature and its decoupled/tiered scope.
Description check ✅ Passed The description matches the change by explaining the drop behavior, modes, and purge caveat.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/drop-iceberg-table

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture_decoupled.md`:
- Around line 301-309: Update the purge behavior description in the architecture
documentation to clarify that the hard profile provides no recovery window while
physical object deletion still occurs asynchronously through Lakekeeper’s
background purge process. Replace “immediate” wording with language
distinguishing logical irrecoverability from eventual physical deletion, and
preserve the soft-profile expiration-window behavior.

In `@docs/usage.md`:
- Around line 352-362: Update the purge workflow documentation to state that
Lakekeeper table protection must be enabled manually before recommending
purge=true, and clarify that this function cannot override an active protection
hold. Keep the existing explanation of the irreversible purge outcomes and
asynchronous deletion behavior unchanged.

In `@extension/coldfront/coldfront--1.0.sql`:
- Around line 2464-2476: Update the alias construction in the DROP TABLE
statement’s `v_alias` expression to include a stable digest derived from the
current `coldfront.warehouse`, `coldfront.lakekeeper_endpoint`, and
`_attach_delegation_mode()` values, while retaining the purge-state distinction.
Ensure the resulting alias remains valid for the existing `%I` identifier
formatting and changes whenever any catalog setting changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 7effb807-d3c9-4882-8a56-ff6bc6bf8f4a

📥 Commits

Reviewing files that changed from the base of the PR and between 85baec5 and 6cc9ecd.

⛔ Files ignored due to path filters (1)
  • extension/coldfront/test/expected/drop_iceberg_table.out is excluded by !**/*.out
📒 Files selected for processing (9)
  • README.md
  • ci/journey.sh
  • docs/architecture.md
  • docs/architecture_decoupled.md
  • docs/index.md
  • docs/usage.md
  • extension/coldfront/Makefile
  • extension/coldfront/coldfront--1.0.sql
  • extension/coldfront/test/sql/drop_iceberg_table.sql

Comment thread docs/architecture_decoupled.md Outdated
Comment thread docs/usage.md
Comment thread extension/coldfront/coldfront--1.0.sql
@vyruss
vyruss force-pushed the feat/drop-iceberg-table branch from 6cc9ecd to b7d2909 Compare July 28, 2026 21:16
@vyruss
vyruss merged commit 26fb7d7 into main Jul 28, 2026
6 checks passed
vyruss added a commit that referenced this pull request Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant