This is an automated email from the ASF dual-hosted git repository.
danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git
The following commit(s) were added to refs/heads/master by this push:
new 9a1cb6094de [MINOR] Infer the preCombine field only if the value is
not null (#9447)
9a1cb6094de is described below
commit 9a1cb6094dec7d6ec1ee62513e50790b611258db
Author: Danny Chan <[email protected]>
AuthorDate: Tue Aug 15 17:03:06 2023 +0800
[MINOR] Infer the preCombine field only if the value is not null (#9447)
Table created by Spark may not have the preCombine field set up.
---
.../hudi-flink/src/main/java/org/apache/hudi/util/CompactionUtil.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/CompactionUtil.java
b/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/CompactionUtil.java
index 63a00dd10c3..d14262f02e0 100644
---
a/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/CompactionUtil.java
+++
b/hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/CompactionUtil.java
@@ -128,7 +128,9 @@ public class CompactionUtil {
*/
public static void setPreCombineField(Configuration conf,
HoodieTableMetaClient metaClient) {
String preCombineField = metaClient.getTableConfig().getPreCombineField();
- conf.setString(FlinkOptions.PRECOMBINE_FIELD, preCombineField);
+ if (preCombineField != null) {
+ conf.setString(FlinkOptions.PRECOMBINE_FIELD, preCombineField);
+ }
}
/**