spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ueshin <...@git.apache.org>
Subject [GitHub] spark pull request #22466: [SPARK-25464][SQL] Create Database to the locatio...
Date Fri, 19 Oct 2018 05:24:23 GMT
Github user ueshin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22466#discussion_r226536626
  
    --- 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 --
    
    @HyukjinKwon The first one is `e,s` -> `e, s` ?


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message