@@ -1601,8 +1601,7 @@ class HiveDDLSuite
16011601 """ .stripMargin)
16021602
16031603 val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier (" t" ))
1604- val expectedPath = s " file: ${dir.getAbsolutePath.stripSuffix(" /" )}"
1605- assert(table.location.stripSuffix(" /" ) == expectedPath)
1604+ assert(table.location.stripSuffix(" /" ) == dir.getAbsolutePath.stripSuffix(" /" ))
16061605
16071606 checkAnswer(spark.table(" t" ), Row (3 , 4 , 1 , 2 ))
16081607 }
@@ -1614,15 +1613,14 @@ class HiveDDLSuite
16141613 |CREATE TABLE t1
16151614 |USING parquet
16161615 |PARTITIONED BY(a, b)
1617- |LOCATION 'file: $dir'
1616+ |LOCATION ' $dir'
16181617 |AS SELECT 3 as a, 4 as b, 1 as c, 2 as d
16191618 """ .stripMargin)
16201619
16211620 val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier (" t1" ))
1622- val expectedPath = s " file: ${dir.getAbsolutePath.stripSuffix(" /" )}"
1623- assert(table.location.stripSuffix(" /" ) == expectedPath)
1621+ assert(table.location.stripSuffix(" /" ) == dir.getAbsolutePath.stripSuffix(" /" ))
16241622
1625- val partDir = new File (dir.getAbsolutePath + " / a=3" )
1623+ val partDir = new File (dir, " a=3" )
16261624 assert(partDir.exists())
16271625
16281626 checkAnswer(spark.table(" t1" ), Row (1 , 2 , 3 , 4 ))
@@ -1665,7 +1663,7 @@ class HiveDDLSuite
16651663 val expectedPath = s " file: ${dir.getAbsolutePath.stripSuffix(" /" )}"
16661664 assert(table.location.stripSuffix(" /" ) == expectedPath)
16671665
1668- val partDir = new File (dir.getAbsolutePath + " / a=3" )
1666+ val partDir = new File (dir, " a=3" )
16691667 assert(partDir.exists())
16701668
16711669 checkAnswer(spark.table(" t1" ), Row (1 , 2 , 3 , 4 ))
0 commit comments