File tree Expand file tree Collapse file tree 1 file changed +4
-16
lines changed
Expand file tree Collapse file tree 1 file changed +4
-16
lines changed Original file line number Diff line number Diff line change @@ -1877,23 +1877,11 @@ def insert(
18771877 snapshot = kwargs ["snapshot" ]
18781878 snapshots = kwargs ["snapshots" ]
18791879
1880- # We must replace a materialized view if its query has changed or if it depends on a table.
1881- # The latter is because if the underlying table is replaced, the materialized view is invalidated in some of the engines.
18821880 if (
1883- (
1884- isinstance (query_or_df , exp .Expression )
1885- and snapshot .is_materialized_view
1886- and deployability_index .is_deployable (snapshot )
1887- and model .render_query (
1888- snapshots = snapshots ,
1889- deployability_index = deployability_index ,
1890- engine_adapter = self .adapter ,
1891- )
1892- == query_or_df
1893- and not model .depends_on
1894- )
1895- or self .adapter .HAS_VIEW_BINDING
1896- ) and self .adapter .table_exists (table_name ):
1881+ not snapshot .is_materialized_view
1882+ and self .adapter .HAS_VIEW_BINDING
1883+ and self .adapter .table_exists (table_name )
1884+ ):
18971885 logger .info ("Skipping creation of the view '%s'" , table_name )
18981886 return
18991887
You can’t perform that action at this time.
0 commit comments