File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9914,14 +9914,19 @@ def test_resolve_table_cross_dialect_fqn_mismatch(make_snapshot: t.Callable):
99149914 performs when the key IS found -- would have matched them.
99159915 """
99169916
9917+ # Use explicit per-model normalization settings so this regression is independent of
9918+ # mutable process-global SQLGlot dialect settings.
9919+ parent_dialect = "snowflake,normalization_strategy=uppercase"
9920+ child_dialect = "duckdb,normalization_strategy=case_insensitive"
9921+
99179922 @macro ()
99189923 def resolve_named (evaluator , name ):
99199924 return evaluator .resolve_table (name .name )
99209925
99219926 # parent is declared/rendered under snowflake, which uppercases unquoted identifiers, so its
99229927 # fqn (the key that will appear in `snapshots`) is uppercase-quoted.
99239928 parent = load_sql_based_model (
9924- d .parse ("MODEL (name parent); SELECT 1 AS c" ), dialect = "snowflake"
9929+ d .parse ("MODEL (name parent); SELECT 1 AS c" ), dialect = parent_dialect
99259930 )
99269931 parent_snapshot = make_snapshot (parent )
99279932 parent_snapshot .categorize_as (SnapshotChangeCategory .BREAKING )
@@ -9936,7 +9941,7 @@ def resolve_named(evaluator, name):
99369941 @resolve_named('parent')
99379942 """
99389943 ),
9939- dialect = "duckdb" ,
9944+ dialect = child_dialect ,
99409945 )
99419946
99429947 snapshots = {parent .fqn : parent_snapshot }
You can’t perform that action at this time.
0 commit comments