Skip to content

Commit

Permalink
Handle default warehouse path in SQLConf
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaram committed Dec 15, 2016
1 parent 2583410 commit 1d0d1d2
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,13 @@ private[sql] class SQLConf extends Serializable with CatalystConf with Logging {

def variableSubstituteDepth: Int = getConf(VARIABLE_SUBSTITUTE_DEPTH)

def warehousePath: String = new Path(getConf(StaticSQLConf.DEFAULT_WAREHOUSE_PATH)).toString
def warehousePath: String = {
if (contains(StaticSQLConf.WAREHOUSE_PATH.key)) {
new Path(getConf(StaticSQLConf.WAREHOUSE_PATH).get).toString
} else {
new Path(getConf(StaticSQLConf.DEFAULT_WAREHOUSE_PATH)).toString
}
}

def ignoreCorruptFiles: Boolean = getConf(IGNORE_CORRUPT_FILES)

Expand Down

0 comments on commit 1d0d1d2

Please sign in to comment.