Rebase truncate changes on top of PR #969#1
Open
jprafael wants to merge 9 commits into
Open
Conversation
jprafael
commented
Apr 10, 2026
Comment on lines
+1798
to
+4413
| @@ -1900,8 +1900,7 @@ ORDER BY data.begin_snapshot, data.row_id_start, data.data_file_id, del.begin_sn | |||
| delete_file.data = ReadDeleteFile(table, row, col_idx, IsEncrypted()); | |||
| file_entry.delete_files.push_back(std::move(delete_file)); | |||
| } | |||
|
|
|||
| // Load inlined deletions for active files so rewrite compaction can treat them the same as delete files | |||
| // Load inlined deletions for active files so rewrite compaction can treat them the same as delete files. | |||
| auto inlined_deletions = ReadInlinedFileDeletions(table_id, snapshot); | |||
| for (auto &file : files) { | |||
| auto entry = inlined_deletions.find(file.file.id.index); | |||
| @@ -4410,8 +4409,8 @@ WHERE end_snapshot IS NOT NULL AND NOT EXISTS( | |||
|
|
|||
| void DuckLakeMetadataManager::DeleteInlinedData(const DuckLakeInlinedTableInfo &inlined_table) { | |||
| auto result = transaction.Query(StringUtil::Format(R"( | |||
| DELETE FROM {METADATA_CATALOG}.%s | |||
| )", | |||
| DELETE FROM {METADATA_CATALOG}.%s | |||
| )", | |||
Owner
Author
There was a problem hiding this comment.
remove whitespace/comment only changes.
| } | ||
| case DuckLakeDataType::INLINED_DATA: { | ||
| auto row_ids = GetVisibleInlinedRowIds(transaction, read_info.snapshot, file_info.file.path); | ||
| transaction.AddNewInlinedDeletes(table.GetTableId(), file_info.file.path, std::move(row_ids)); |
Owner
Author
There was a problem hiding this comment.
The whole purpose of this PR is so that TRUNCATE doesn't have to iterate through rows.
Why can't this just set the entire inline "file" as deleted?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a fork-only comparison PR.
pr-969-base-for-825is a fork copy of duckdb/ducklake PR fix: deletion bugs (fixes issue #917) duckdb/ducklake#969pr-825-rebased-on-969is the full PR Ducklake truncate operator duckdb/ducklake#825 stack rebased on top of that branchBecause the base branch already contains duckdb#969, this PR shows only the remaining differences from duckdb#825 after rebasing on top of duckdb#969.
Included commits
Notes
This PR is intended for comparison/review in
jprafael/ducklakeonly and does not targetduckdb/ducklakedirectly.