xiarixiaoyao commented on a change in pull request #4785:
URL: https://github.com/apache/hudi/pull/4785#discussion_r805752004
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/bucket/BucketIdentifier.java
##########
@@ -43,7 +43,7 @@ public static int getBucketId(HoodieKey hoodieKey, String
indexKeyFields, int nu
} else {
Map<String, String> recordKeyPairs =
Arrays.stream(hoodieKey.getRecordKey().split(","))
.map(p -> p.split(":"))
- .collect(Collectors.toMap(p -> p[0], p -> p[1]));
+ .collect(Collectors.toMap(p -> p[0], p -> p.length == 1 ? "" :
p[1]));
hashKeyFields = Arrays.stream(indexKeyFields.split(","))
Review comment:
Our users use a composite primary key (col1, col2, col3). The value of
col3 contains special characters
This problem occurs as long as the column value consists of ':'
--
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]