Skip to content

fix: ensure _get_data_objects respects snapshots with different schem…#5515

Merged
themisvaltinos merged 3 commits intoSQLMesh:mainfrom
z3z1ma:fix/get-data-objects
Oct 16, 2025
Merged

fix: ensure _get_data_objects respects snapshots with different schem…#5515
themisvaltinos merged 3 commits intoSQLMesh:mainfrom
z3z1ma:fix/get-data-objects

Conversation

@z3z1ma
Copy link
Contributor

@z3z1ma z3z1ma commented Oct 9, 2025

…a or catalog.

MODEL (name foo.bar);
SELECT 1;

MODEL (name baz.bar);
SELECT 1;

this is enough for get data objects in the snapshot evaluator to think a table doesn't exist, which causes cascading issues (as you'd expect) with, for example, skipping SnapshotEvaluator.migrate in situations where the table did in fact exist. This causes issues with downstream tables which expect a correct schema when doing CTAS and such. Its a hard to diagnose breakage without a lot of fishing.

@z3z1ma z3z1ma force-pushed the fix/get-data-objects branch from a38d982 to 0c79100 Compare October 9, 2025 06:18
@z3z1ma z3z1ma force-pushed the fix/get-data-objects branch from 0c79100 to b8b983a Compare October 9, 2025 18:15
Copy link
Contributor

@themisvaltinos themisvaltinos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplified the lookup to not mismatch catalogs and fixed the failing tests to unblock you @z3z1ma

@themisvaltinos themisvaltinos merged commit 1f39998 into SQLMesh:main Oct 16, 2025
32 checks passed
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