From 00e57af09f1f8fe1eaae3ed7377a6ecdf19db25e Mon Sep 17 00:00:00 2001 From: mszerencse Date: Tue, 1 Sep 2026 10:16:42 +0200 Subject: [PATCH] fix(test): replace QUALIFY assertion with dialect-agnostic CASE WHEN check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The QUALIFY keyword is not emitted by the satellite generator — it uses a subquery+WHERE pattern to stay portable across dialects. Using sqlglot's .qualify() to satisfy the test would break Postgres: sqlglot's QUALIFY→subquery rewrite injects duplicate columns (SELECT *, rn, _w) causing an ambiguous column reference error on the incremental path. Co-Authored-By: Claude Sonnet 4.6 --- tests/test_satellite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_satellite.py b/tests/test_satellite.py index 6923105..55b5d66 100644 --- a/tests/test_satellite.py +++ b/tests/test_satellite.py @@ -40,7 +40,7 @@ def test_sat_v0_full_load(write_sql): write_sql("Full Load (LAG dedup, no incremental CTEs)", sql) assert "deduplicated_numbered_source" in sql assert "LAG" in sql - assert "QUALIFY" in sql + assert "CASE WHEN" in sql assert "latest_entries_in_sat" not in sql assert "records_to_insert" not in sql