Skip to content

Commit 2f4566c

Browse files
committed
Fix warehousePath for 2.0
1 parent 6f38507 commit 2f4566c

File tree

1 file changed

+4
-2
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/internal

1 file changed

+4
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -691,8 +691,10 @@ private[sql] class SQLConf extends Serializable with CatalystConf with Logging {
691691

692692
def variableSubstituteDepth: Int = getConf(VARIABLE_SUBSTITUTE_DEPTH)
693693

694-
def warehousePath: String = new Path(getConf(WAREHOUSE_PATH)).toString
695-
694+
def warehousePath: String = {
695+
new Path(getConf(WAREHOUSE_PATH).replace("${system:user.dir}",
696+
System.getProperty("user.dir"))).toString
697+
}
696698
override def orderByOrdinal: Boolean = getConf(ORDER_BY_ORDINAL)
697699

698700
override def groupByOrdinal: Boolean = getConf(GROUP_BY_ORDINAL)

0 commit comments

Comments
 (0)