huangxiaopingRD commented on code in PR #8355:
URL: https://github.com/apache/hudi/pull/8355#discussion_r1172376778
##########
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:
It will not be null. Because when creating a hudi table, if there is no
database, the current default database will be used as the databaseName. So
`metaClient.getTableConfig.getDatabaseName` usually returns `default`.
We can see the part from here:
https://github.com/apache/hudi/blob/master/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/catalyst/catalog/HoodieCatalogTable.scala#L187
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]