linliu-code commented on code in PR #13959:
URL: https://github.com/apache/hudi/pull/13959#discussion_r2372738791
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieWriterUtils.scala:
##########
@@ -217,28 +218,28 @@ object HoodieWriterUtils {
}
/**
- * This function adds specific rules to choose the right config key for
payload class for version 9 tables.
- *
- * RULE 1: When
- * 1. table version is 9,
- * 2. writer key is a payload class key, and
- * 3. table config has legacy payload class configured,
- * then
- * return legacy payload class key.
- *
- * Basic rule:
- * return writer key.
+ * For table version >= 9, this function finds the corresponding key in
`HoodieTableConfig`
+ * for a key in `HoodieWriteConfig`, including configs related to payload
class, record merge mode, merge strategy id.
*/
- def getPayloadClassConfigKeyFromTableConfig(key: String, tableConfig:
HoodieConfig): String = {
- if (tableConfig == null) {
+ def getKeyInTableConfig(key: String, tableConfig: HoodieConfig): String = {
+ if (tableConfig == null || tableConfig.getInt(HoodieTableConfig.VERSION) <
HoodieTableVersion.NINE.versionCode()) {
Review Comment:
yes, will do.
--
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]