Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test
  • Loading branch information
imback82 committed Dec 8, 2020
commit addfa137684b218347230d4d8110ce97c58ac5a8
Original file line number Diff line number Diff line change
Expand Up @@ -721,16 +721,18 @@ class DDLParserSuite extends AnalysisTest {
}

test("drop view") {
val cmd = "DROP VIEW"
val hint = Some("Please use DROP TABLE instead.")
parseCompare(s"DROP VIEW testcat.db.view",
DropView(UnresolvedView(Seq("testcat", "db", "view"), "DROP VIEW"), ifExists = false))
DropView(UnresolvedView(Seq("testcat", "db", "view"), cmd, hint), ifExists = false))
parseCompare(s"DROP VIEW db.view",
DropView(UnresolvedView(Seq("db", "view"), "DROP VIEW"), ifExists = false))
DropView(UnresolvedView(Seq("db", "view"), cmd, hint), ifExists = false))
parseCompare(s"DROP VIEW IF EXISTS db.view",
DropView(UnresolvedView(Seq("db", "view"), "DROP VIEW"), ifExists = true))
DropView(UnresolvedView(Seq("db", "view"), cmd, hint), ifExists = true))
parseCompare(s"DROP VIEW view",
DropView(UnresolvedView(Seq("view"), "DROP VIEW"), ifExists = false))
DropView(UnresolvedView(Seq("view"), cmd, hint), ifExists = false))
parseCompare(s"DROP VIEW IF EXISTS view",
DropView(UnresolvedView(Seq("view"), "DROP VIEW"), ifExists = true))
DropView(UnresolvedView(Seq("view"), cmd, hint), ifExists = true))
}

private def testCreateOrReplaceDdl(
Expand Down