Skip to content

Commit

Permalink
[HUDI-2057] CTAS Generate An External Table When Create Managed Table
Browse files Browse the repository at this point in the history
  • Loading branch information
dongkelun committed Nov 4, 2022
1 parent 0d7d3aa commit 9eed30f
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -107,9 +107,9 @@ trait ProvidesHoodieConfig extends Logging {
val path = hoodieCatalogTable.tableLocation
val tableType = hoodieCatalogTable.tableTypeName
val tableConfig = hoodieCatalogTable.tableConfig
val catalogProperties = hoodieCatalogTable.catalogProperties
val catalogProperties = hoodieCatalogTable.catalogProperties ++ extraOptions

val hoodieProps = getHoodieProps(catalogProperties, tableConfig, sparkSession.sqlContext.conf, extraOptions)
val hoodieProps = getHoodieProps(catalogProperties, tableConfig, sparkSession.sqlContext.conf)
val hiveSyncConfig = buildHiveSyncConfig(hoodieProps, hoodieCatalogTable)

val parameters = withSparkConf(sparkSession, catalogProperties)()
Expand Down Expand Up @@ -281,8 +281,8 @@ trait ProvidesHoodieConfig extends Logging {
}
}

def getHoodieProps(catalogProperties: Map[String, String], tableConfig: HoodieTableConfig, conf: SQLConf, extraOptions: Map[String, String] = Map.empty): TypedProperties = {
val options: Map[String, String] = catalogProperties ++ tableConfig.getProps.asScala.toMap ++ conf.getAllConfs ++ extraOptions
def getHoodieProps(catalogProperties: Map[String, String], tableConfig: HoodieTableConfig, conf: SQLConf): TypedProperties = {
val options: Map[String, String] = catalogProperties ++ tableConfig.getProps.asScala.toMap ++ conf.getAllConfs
val hoodieConfig = HoodieWriterUtils.convertMapToHoodieConfig(options)
hoodieConfig.getProps
}
Expand Down

0 comments on commit 9eed30f

Please sign in to comment.