File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -311,9 +311,9 @@ workflows:
311311 - fabric
312312 - gcp-postgres
313313 filters :
314- branches :
315- only :
316- - main
314+ # branches:
315+ # only:
316+ # - main
317317 - ui_style
318318 - ui_test
319319 - vscode_test
Original file line number Diff line number Diff line change @@ -2284,11 +2284,11 @@ def insert(
22842284 ) -> None :
22852285 snapshot = kwargs ["snapshot" ]
22862286
2287- if (
2288- not snapshot . is_materialized_view
2289- and self . adapter . HAS_VIEW_BINDING
2290- and self .adapter .table_exists ( table_name )
2291- ):
2287+ # For all engines that support materialized views (except RisingWave) we recreate it.
2288+ # This is because case if upstream tables were recreated (e.g FULL models), the mview would be invalidated as well.
2289+ # RisingWave is an exception as it doesn't support CREATE OR REPLACE, so upstream models don't recreate their physical tables.
2290+ force_view_replace = snapshot . is_materialized_view and not self .adapter .HAS_VIEW_BINDING
2291+ if not force_view_replace and self . adapter . table_exists ( table_name ):
22922292 logger .info ("Skipping creation of the view '%s'" , table_name )
22932293 return
22942294
@@ -2297,7 +2297,7 @@ def insert(
22972297 table_name ,
22982298 query_or_df ,
22992299 model .columns_to_types ,
2300- replace = snapshot . is_materialized_view or not self . adapter . HAS_VIEW_BINDING ,
2300+ replace = force_view_replace ,
23012301 materialized = self ._is_materialized_view (model ),
23022302 view_properties = kwargs .get ("physical_properties" , model .physical_properties ),
23032303 table_description = model .description ,
You can’t perform that action at this time.
0 commit comments