Github user HyukjinKwon commented on a diff in the pull request: https://github.com/apache/spark/pull/22466#discussion_r226536304 --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala --- @@ -840,12 +840,19 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils { } test("create table in default db") { - val catalog = spark.sessionState.catalog - val tableIdent1 = TableIdentifier("tab1", None) - createTable(catalog, tableIdent1) - val expectedTableIdent = tableIdent1.copy(database = Some("default")) - val expectedTable = generateTable(catalog, expectedTableIdent) - checkCatalogTables(expectedTable, catalog.getTableMetadata(tableIdent1)) + var tablePath: Option[URI] = None + try { + val catalog = spark.sessionState.catalog + val tableIdent1 = TableIdentifier("tab1", None) + createTable(catalog, tableIdent1) + val expectedTableIdent = tableIdent1.copy(database = Some("default")) + val expectedTable = generateTable(catalog, expectedTableIdent) + tablePath = Some(expectedTable.location) + checkCatalogTables(expectedTable, catalog.getTableMetadata(tableIdent1)) + } finally { + // This is external table,so it is required to deleted the path --- End diff -- tiny nit: `e,` -> `e ,`
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org