This is an automated email from the ASF dual-hosted git repository.
zirui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 24501f9db9 [INLONG-9205][Sort] Fix Hudi connector primary key doesn't
exist error (#9323)
24501f9db9 is described below
commit 24501f9db913b762c876de44cd1ea3f5358af0f2
Author: Sting <[email protected]>
AuthorDate: Fri Nov 24 10:29:46 2023 +0800
[INLONG-9205][Sort] Fix Hudi connector primary key doesn't exist error
(#9323)
---
inlong-sort/sort-common.zip | Bin 0 -> 1482025 bytes
.../inlong/sort/protocol/node/load/HudiLoadNode.java | 4 +++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/inlong-sort/sort-common.zip b/inlong-sort/sort-common.zip
new file mode 100644
index 0000000000..a05e790de8
Binary files /dev/null and b/inlong-sort/sort-common.zip differ
diff --git
a/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java
b/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java
index 4418a43ba4..e411f89a8a 100644
---
a/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java
+++
b/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/HudiLoadNode.java
@@ -160,7 +160,9 @@ public class HudiLoadNode extends LoadNode implements
InlongMetric, Serializable
options.put(HUDI_OPTION_DATABASE_NAME, dbName);
options.put(HUDI_OPTION_TABLE_NAME, tableName);
- options.put(HUDI_OPTION_RECORD_KEY_FIELD_NAME, primaryKey);
+ if (StringUtils.isNoneBlank(primaryKey)) {
+ options.put(HUDI_OPTION_RECORD_KEY_FIELD_NAME, primaryKey);
+ }
options.put("connector", "hudi-inlong");
return options;