healchow commented on code in PR #7272:
URL: https://github.com/apache/inlong/pull/7272#discussion_r1088529095


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/sink/hudi/HudiSinkOperator.java:
##########
@@ -77,20 +81,22 @@ protected void setTargetEntity(SinkRequest request, 
StreamSinkEntity targetEntit
 
         String partitionKey = sinkRequest.getPartitionKey();
         String primaryKey = sinkRequest.getPrimaryKey();
-        boolean primaryKeyExist = StringUtils.isNotEmpty(partitionKey);
-        boolean partitionKeyExist = StringUtils.isNotEmpty(primaryKey);
+        boolean primaryKeyExist = StringUtils.isNotBlank(partitionKey);
+        boolean partitionKeyExist = StringUtils.isNotBlank(primaryKey);
         if (primaryKeyExist || partitionKeyExist) {
             Set<String> fieldNames = 
sinkRequest.getSinkFieldList().stream().map(SinkField::getFieldName)
                     .collect(Collectors.toSet());
-            if (primaryKeyExist) {
-                if (!fieldNames.contains(partitionKey)) {
+            if (partitionKeyExist) {
+                List<String> partitionKeys = 
Arrays.asList(partitionKey.split(","));

Review Comment:
   Please replace `,` with 'InlongConstants.COMMA'.



-- 
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]

Reply via email to