You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "danny0405 (via GitHub)" <gi...@apache.org> on 2023/04/20 03:28:21 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #8355: [HUDI-6016] HoodieCLIUtils supports creating HoodieClient with non-default database

danny0405 commented on code in PR #8355:
URL: https://github.com/apache/hudi/pull/8355#discussion_r1172044384


##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieCLIUtils.scala:
##########
@@ -40,8 +41,9 @@ object HoodieCLIUtils extends ProvidesHoodieConfig{
       .setConf(sparkSession.sessionState.newHadoopConf()).build()
     val schemaUtil = new TableSchemaResolver(metaClient)
     val schemaStr = schemaUtil.getTableAvroSchema(false).toString
+    val table = StringUtils.join(metaClient.getTableConfig.getDatabaseName, ".", metaClient.getTableConfig.getTableName)
     val finalParameters = HoodieWriterUtils.parametersWithWriteDefaults(
-      buildHoodieConfig(getHoodieCatalogTable(sparkSession, metaClient.getTableConfig.getTableName)) ++ conf)

Review Comment:
   Be caution that `metaClient.getTableConfig.getDatabaseName` does not have default value.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org