Skip to content

Commit

Permalink
Set updateType once for Materialized views refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
Praveen2112 committed Oct 8, 2021
1 parent d39544e commit 85b6419
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -526,10 +526,10 @@ protected Scope visitRefreshMaterializedView(RefreshMaterializedView refreshMate
}

accessControl.checkCanRefreshMaterializedView(session.toSecurityContext(), name);
analysis.setUpdateType("REFRESH MATERIALIZED VIEW");

if (metadata.delegateMaterializedViewRefreshToConnector(session, name)) {
analysis.setDelegatedRefreshMaterializedView(name);
analysis.setUpdateType("REFRESH MATERIALIZED VIEW");
analysis.setUpdateTarget(
name,
Optional.empty(),
Expand Down Expand Up @@ -590,7 +590,6 @@ protected Scope visitRefreshMaterializedView(RefreshMaterializedView refreshMate
.map(Type::toString),
Column::new);

analysis.setUpdateType("REFRESH MATERIALIZED VIEW");
analysis.setUpdateTarget(
targetTable,
Optional.empty(),
Expand Down

0 comments on commit 85b6419

Please sign in to comment.