Github user srowen commented on a diff in the pull request:

    https://github.com/apache/spark/pull/13868#discussion_r73356981
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala 
---
    @@ -111,36 +111,42 @@ class DDLSuite extends QueryTest with 
SharedSQLContext with BeforeAndAfterEach {
         catalog.createPartitions(tableName, Seq(part), ignoreIfExists = false)
       }
     
    -  private def appendTrailingSlash(path: String): String = {
    -    if (!path.endsWith(File.separator)) path + File.separator else path
    -  }
    -
       test("the qualified path of a database is stored in the catalog") {
         val catalog = spark.sessionState.catalog
     
         withTempDir { tmpDir =>
           val path = tmpDir.toString
           // The generated temp path is not qualified.
           assert(!path.startsWith("file:/"))
    -      sql(s"CREATE DATABASE db1 LOCATION '$path'")
    +      val pathWithForwardSlash = path.replace("\\", "/")
    +      sql(s"CREATE DATABASE db1 LOCATION '$pathWithForwardSlash'")
           val pathInCatalog = new 
Path(catalog.getDatabaseMetadata("db1").locationUri).toUri
           assert("file" === pathInCatalog.getScheme)
    -      val expectedPath = if (path.endsWith(File.separator)) 
path.dropRight(1) else path
    +      val expectedPath = new Path(path).toUri.toString
    --- End diff --
    
    Does this `toUri` need to be removed too?
    Yeah I believe there are at least similar changes needed in `DDLSuite` but 
should be about the same issue.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to