Skip to content

test: functional coverage for skip_optimize; strengthen liquid clustering tests - #1573

Merged
sd-db merged 1 commit into
mainfrom
sd-db/coverage/liquid_clustering
Jul 2, 2026
Merged

test: functional coverage for skip_optimize; strengthen liquid clustering tests#1573
sd-db merged 1 commit into
mainfrom
sd-db/coverage/liquid_clustering

Conversation

@sd-db

@sd-db sd-db commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds functional-test coverage for the skip_optimize model config (#1485) and strengthens two existing liquid-clustering tests to assert server-observable state instead of log substrings. Test-only — no runtime change.

skip_optimize functional coverage (#1485)

skip_optimize=true short-circuits databricks__optimize to a no-op while the clustering declaration stays on the table. This was previously only unit-tested (tests/unit/macros/relations/test_optimize_macros.py). New functional tests assert the end-to-end effect on a live warehouse:

The skip_optimize=false/unset control (OPTIMIZE still runs) is already covered by the existing TestTableLiquidClusteringEffect.

Test strengthening (log substrings → server state)

  • TestLiquidClustering: replaced assert "optimize" in logs with a DESCRIBE HISTORY check that an OPTIMIZE operation actually ran.
  • TestAutoLiquidClustering: it previously used the non-auto fixture, making it a silent duplicate of TestLiquidClustering that never exercised auto clustering. Repointed to the auto fixture; it now asserts clusterByAuto=true via SHOW TBLPROPERTIES, adding auto-clustering-on-incremental coverage.

Testing

All pass on databricks_uc_sql_endpoint:

  • tests/functional/adapter/liquid_clustering/ (both files) + tests/functional/adapter/zorder/11 passed.
  • ruff / ruff format / mypy clean on the changed files.

Checklist

  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests
  • No CHANGELOG.md entry — test-only change with no runtime/user-facing impact

…ring tests

Add functional tests for the skip_optimize model config (#1485): on both
table and incremental materializations, skip_optimize=true suppresses the
post-materialization OPTIMIZE while liquid_clustered_by stays on the created
table, asserted via DESCRIBE HISTORY and SHOW TBLPROPERTIES.

Strengthen two existing tests to assert server-observable state instead of
log substrings:
- TestLiquidClustering: assert OPTIMIZE appears in DESCRIBE HISTORY
- TestAutoLiquidClustering: use the auto fixture and assert clusterByAuto
  (it previously duplicated TestLiquidClustering via the wrong fixture)
@sd-db
sd-db requested a review from jprakash-db as a code owner July 1, 2026 12:57
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Coverage report

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

@sd-db
sd-db merged commit 5ff1b1d into main Jul 2, 2026
9 checks passed
@sd-db
sd-db deleted the sd-db/coverage/liquid_clustering branch July 2, 2026 06:19
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