Skip to content

Commit

Permalink
Use isView to check if the table name corresponds to a view
Browse files Browse the repository at this point in the history
  • Loading branch information
findinpath authored and phd3 committed Sep 13, 2022
1 parent 2ecb1a6 commit c2cfaa0
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -2802,7 +2802,7 @@ protected Scope visitMerge(Merge merge, Optional<Scope> scope)
if (metadata.isMaterializedView(session, tableName)) {
throw semanticException(NOT_SUPPORTED, merge, "Merging into materialized views is not supported");
}
if (metadata.getView(session, tableName).isPresent()) {
if (metadata.isView(session, tableName)) {
throw semanticException(NOT_SUPPORTED, merge, "Merging into views is not supported");
}

Expand Down

0 comments on commit c2cfaa0

Please sign in to comment.