test: functional coverage for skip_optimize; strengthen liquid clustering tests - #1573
Merged
Conversation
…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)
jprakash-db
approved these changes
Jul 1, 2026
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.
Description
Adds functional-test coverage for the
skip_optimizemodel config (#1485) and strengthens two existing liquid-clustering tests to assert server-observable state instead of log substrings. Test-only — no runtime change.skip_optimizefunctional coverage (#1485)skip_optimize=trueshort-circuitsdatabricks__optimizeto 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:TestTableSkipOptimizeEffect— on atablemodel,liquid_clustered_bycolumns are present AND noOPTIMIZEappears inDESCRIBE HISTORY.TestIncrementalSkipOptimizeEffect— same on anincrementalmodel (the high-churn use case from Allow users to opt out of optimize calls on liquid-clustering/zordering #703), exercising the distinct incrementaloptimize()call site.The
skip_optimize=false/unset control (OPTIMIZE still runs) is already covered by the existingTestTableLiquidClusteringEffect.Test strengthening (log substrings → server state)
TestLiquidClustering: replacedassert "optimize" in logswith aDESCRIBE HISTORYcheck that anOPTIMIZEoperation actually ran.TestAutoLiquidClustering: it previously used the non-auto fixture, making it a silent duplicate ofTestLiquidClusteringthat never exercised auto clustering. Repointed to the auto fixture; it now assertsclusterByAuto=trueviaSHOW 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/mypyclean on the changed files.Checklist
CHANGELOG.mdentry — test-only change with no runtime/user-facing impact