Skip to content

fix: add missing optimize() call to table v2 materialization#1345

Merged
sd-db merged 1 commit intomainfrom
sd-db/fix/table-v2-missing-optimize
Mar 7, 2026
Merged

fix: add missing optimize() call to table v2 materialization#1345
sd-db merged 1 commit intomainfrom
sd-db/fix/table-v2-missing-optimize

Conversation

@sd-db
Copy link
Collaborator

@sd-db sd-db commented Mar 6, 2026

Summary

  • Followup to feature: add optimize() call to snapshot materialization (#1335) #1341; I realised the table v2 materialization path in table.sql was missing the optimize() call that exists in all other materialization paths (table v1, incremental v1, incremental v2)
  • When use_materialization_v2 was enabled with liquid_clustered_by, zorder, or auto_liquid_cluster configured, OPTIMIZE would not run after table creation/replacement
  • Adds a functional test for table v2 + liquid clustering

Test plan

  • Unit tests pass (717/717)
  • Functional test TestTableV2LiquidClustering passes — confirms OPTIMIZE runs in the v2 path
  • Existing liquid clustering tests still pass (no regressions)

@github-actions
Copy link

github-actions bot commented Mar 6, 2026

Coverage report

This PR does not seem to contain any modification to coverable code.

The table v2 materialization path was missing the optimize() call that
exists in the v1 path, incremental v1 path, and incremental v2 path.
When use_materialization_v2 was enabled with liquid_clustered_by, zorder,
or auto_liquid_cluster configured, OPTIMIZE would not run after table
creation/replacement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sd-db sd-db force-pushed the sd-db/fix/table-v2-missing-optimize branch from df9d147 to e28f5b7 Compare March 6, 2026 08:00
@sd-db sd-db merged commit 40bfffc into main Mar 7, 2026
12 of 13 checks passed
@sd-db sd-db deleted the sd-db/fix/table-v2-missing-optimize branch March 7, 2026 05:39
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