codope commented on code in PR #9444:
URL: https://github.com/apache/hudi/pull/9444#discussion_r1299186957
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/DataSourceOptions.scala:
##########
@@ -956,9 +956,7 @@ object DataSourceOptionsHelper {
*/
def fetchMissingWriteConfigsFromTableConfig(tableConfig: HoodieTableConfig,
params: Map[String, String]) : Map[String, String] = {
val missingWriteConfigs = scala.collection.mutable.Map[String, String]()
- if (!params.contains(KeyGeneratorOptions.RECORDKEY_FIELD_NAME.key()) &&
tableConfig.getRawRecordKeyFieldProp != null) {
- missingWriteConfigs ++=
Map(KeyGeneratorOptions.RECORDKEY_FIELD_NAME.key() ->
tableConfig.getRawRecordKeyFieldProp)
- }
Review Comment:
I am not following the fix here. I think this is a valid block. If some
batch did not have record key in the write config, then why not infer from
table config if it is present? I believe we resolve the configs before setting
the write operation.
--
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]