Skip to content

Update table stats for compaction rewrites#1220

Open
jdctinuiti wants to merge 6 commits into
duckdb:mainfrom
jdctinuiti:compaction-table-stats
Open

Update table stats for compaction rewrites#1220
jdctinuiti wants to merge 6 commits into
duckdb:mainfrom
jdctinuiti:compaction-table-stats

Conversation

@jdctinuiti

@jdctinuiti jdctinuiti commented Jun 3, 2026

Copy link
Copy Markdown

Stacked on #1172 (drop-data-files-procedure).

This updates compaction commits to adjust ducklake_table_stats.record_count and file_size_bytes for both ducklake_rewrite_data_files and ducklake_merge_adjacent_files. The change computes removed/added data-file deltas and applies them through the existing global table-stats update path introduced in #1172, preserving next_row_id and existing column stats.

Adds a focused SQL regression covering rewrite-delete with output, merge-adjacent, inlined-file-delete rewrite, and zero-output rewrite after flushing fully-deleted inlined data.

@dentiny

dentiny commented Jun 3, 2026

Copy link
Copy Markdown
Member

Cc @dentiny I will take a look later

@dentiny dentiny self-requested a review June 3, 2026 23:36
@jdctinuiti jdctinuiti force-pushed the compaction-table-stats branch 4 times, most recently from 5885442 to 61dd211 Compare June 4, 2026 00:12
@jdctinuiti jdctinuiti force-pushed the compaction-table-stats branch from 61dd211 to e6d33e7 Compare June 4, 2026 00:38
@jdctinuiti jdctinuiti mentioned this pull request Jun 5, 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.

2 participants