rdblue commented on a change in pull request #24686: [SPARK-27813][SQL] 
DataSourceV2: Add DropTable logical operation
URL: https://github.com/apache/spark/pull/24686#discussion_r287860271
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLParserSuite.scala
 ##########
 @@ -906,59 +906,39 @@ class DDLParserSuite extends PlanTest with 
SharedSQLContext {
   test("drop table") {
     val tableName1 = "db.tab"
     val tableName2 = "tab"
-
-    val parsed = Seq(
-        s"DROP TABLE $tableName1",
-        s"DROP TABLE IF EXISTS $tableName1",
-        s"DROP TABLE $tableName2",
-        s"DROP TABLE IF EXISTS $tableName2",
-        s"DROP TABLE $tableName2 PURGE",
-        s"DROP TABLE IF EXISTS $tableName2 PURGE"
-      ).map(parser.parsePlan)
-
-    val expected = Seq(
-      DropTableCommand(TableIdentifier("tab", Option("db")), ifExists = false, 
isView = false,
-        purge = false),
-      DropTableCommand(TableIdentifier("tab", Option("db")), ifExists = true, 
isView = false,
-        purge = false),
-      DropTableCommand(TableIdentifier("tab", None), ifExists = false, isView 
= false,
-        purge = false),
-      DropTableCommand(TableIdentifier("tab", None), ifExists = true, isView = 
false,
-        purge = false),
-      DropTableCommand(TableIdentifier("tab", None), ifExists = false, isView 
= false,
-        purge = true),
-      DropTableCommand(TableIdentifier("tab", None), ifExists = true, isView = 
false,
-        purge = true))
-
-    parsed.zip(expected).foreach { case (p, e) => comparePlans(p, e) }
+    Seq(
 
 Review comment:
   The approach for tests in SPARK-27108 was to avoid changing these tests so 
that we know that the behavior is exactly the same. Because the tests now 
require both parsing and running `DataSourceResolution`, the tests should be 
moved as-is to `PlanResolutionSuite`.
   
   In addition, we also need to add new/updated parser tests. But because the 
parsing code can now be in Catalyst, the updated parser tests should be added 
to the catalyst `DDLParserSuite` instead of this one.
   
   You can see how this was done for create and CTAS in 
https://github.com/apache/spark/pull/24029.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to