1
0

[HUDI-3253] preferred to use the table's own location (#4608)

This commit is contained in:
Yann Byron
2022-01-29 16:39:42 +08:00
committed by GitHub
parent ed7aa138e8
commit ecbad9526a

View File

@@ -201,10 +201,8 @@ object HoodieSqlCommonUtils extends SparkAdapterSupport {
}
def getTableLocation(table: CatalogTable, sparkSession: SparkSession): String = {
val uri = if (table.tableType == CatalogTableType.MANAGED && isHoodieTable(table)) {
val uri = table.storage.locationUri.orElse {
Some(sparkSession.sessionState.catalog.defaultTablePath(table.identifier))
} else {
table.storage.locationUri
}
val conf = sparkSession.sessionState.newHadoopConf()
uri.map(makePathQualified(_, conf))