---
status: complete
phase: v0.7.0-all
source: 51-01-SUMMARY.md, 52-01-SUMMARY.md, 53-01-SUMMARY.md, 54-01-SUMMARY.md, 55-01-SUMMARY.md, 56-01-SUMMARY.md, 57-01-SUMMARY.md
started: 2026-04-24T00:00:00Z
updated: 2026-04-24T01:00:00Z
---

## Current Test

[testing complete]

## Tests

### 1. Create semantic view from inline YAML
expected: `CREATE SEMANTIC VIEW test_yaml FROM YAML $$ ... $$` with tables, dimensions, and metrics creates a view that is queryable via `semantic_view('test_yaml', dimensions := [...], metrics := [...])`
result: pass

### 2. CREATE OR REPLACE from YAML
expected: `CREATE OR REPLACE SEMANTIC VIEW test_yaml FROM YAML $$ ... $$` replaces the existing view with a new definition, and queries reflect the replacement
result: pass

### 3. CREATE IF NOT EXISTS from YAML
expected: `CREATE SEMANTIC VIEW IF NOT EXISTS test_yaml FROM YAML $$ ... $$` is a no-op when the view already exists (no error, original definition retained)
result: pass

### 4. FROM YAML FILE creates view from external file
expected: `CREATE SEMANTIC VIEW test_file FROM YAML FILE '/path/to/file.yaml'` creates a queryable semantic view from the file contents
result: pass

### 5. FROM YAML FILE blocked by enable_external_access
expected: After `SET enable_external_access = false`, `CREATE SEMANTIC VIEW ... FROM YAML FILE '...'` fails with a security error
result: pass

### 6. MATERIALIZATIONS clause in SQL DDL
expected: A semantic view with `MATERIALIZATIONS ( mat_name AS ( TABLE agg_table, DIMENSIONS (...), METRICS (...) ) )` stores the materialization and is queryable
result: pass

### 7. MATERIALIZATIONS in YAML definition
expected: A YAML definition with a `materializations:` section produces the same materialization metadata as the SQL DDL equivalent
result: pass

### 8. Materialization routing (exact match)
expected: When a materialization exactly covers the requested dimensions and metrics, the expanded SQL reads from the materialization table instead of the raw source table
result: pass

### 9. Materialization fallback (no match)
expected: When no materialization covers the requested dimensions/metrics, the query falls back to raw table expansion with no error
result: pass

### 10. Semi-additive metrics bypass routing
expected: A query requesting a metric declared with NON ADDITIVE BY always falls back to raw expansion, even if a materialization covers the dimensions and metrics
result: pass

### 11. READ_YAML_FROM_SEMANTIC_VIEW export
expected: `SELECT read_yaml_from_semantic_view('view_name')` returns a YAML string representing the stored definition, including materializations
result: pass

### 12. YAML round-trip fidelity
expected: Exporting a view to YAML via read_yaml_from_semantic_view, then creating a new view from that YAML produces an identical definition
result: pass

### 13. EXPLAIN shows materialization routing
expected: `explain_semantic_view()` output includes a `-- Materialization: <name>` or `-- Materialization: none` line in the header
result: pass

### 14. DESCRIBE includes materializations
expected: `DESCRIBE SEMANTIC VIEW` output includes MATERIALIZATION rows showing table, dimensions, and metrics for each declared materialization
result: pass

### 15. SHOW SEMANTIC MATERIALIZATIONS
expected: `SHOW SEMANTIC MATERIALIZATIONS IN view_name` lists all declared materializations with their name, table, dimensions, and metrics
result: pass

### 16. Full test suite passes
expected: `just test-all` completes with zero failures
result: pass

## Summary

total: 16
passed: 16
issues: 0
pending: 0
skipped: 0
blocked: 0

## Gaps

[none yet]
