[HUDI-3972] Fixing hoodie.properties/tableConfig for no preCombine field with writes (#5424)
Fixed instantiation of new table to set the null for preCombine if not explicitly set by the user.
This commit is contained in:
committed by
GitHub
parent
f2ba0fead2
commit
762623a15c
@@ -150,7 +150,9 @@ object HoodieSparkSqlWriter {
|
||||
.setBaseFileFormat(baseFileFormat)
|
||||
.setArchiveLogFolder(archiveLogFolder)
|
||||
.setPayloadClassName(hoodieConfig.getString(PAYLOAD_CLASS_NAME))
|
||||
.setPreCombineField(hoodieConfig.getStringOrDefault(PRECOMBINE_FIELD, null))
|
||||
// we can't fetch preCombine field from hoodieConfig object, since it falls back to "ts" as default value,
|
||||
// but we are interested in what user has set, hence fetching from optParams.
|
||||
.setPreCombineField(optParams.getOrElse(PRECOMBINE_FIELD.key(), null))
|
||||
.setPartitionFields(partitionColumns)
|
||||
.setPopulateMetaFields(populateMetaFields)
|
||||
.setRecordKeyFields(hoodieConfig.getString(RECORDKEY_FIELD))
|
||||
|
||||
Reference in New Issue
Block a user