danny0405 commented on code in PR #4676:
URL: https://github.com/apache/hudi/pull/4676#discussion_r967560516
##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java:
##########
@@ -490,6 +490,25 @@ public static String
getNestedFieldValAsString(GenericRecord record, String fiel
return StringUtils.objToString(obj);
}
+ public static Object getNestedFieldValAsString(GenericRecord record, String
fieldName) {
+ Object obj = getNestedFieldVal(record, fieldName, true, false);
+ return obj == null ? "" : StringUtils.objToString(obj);
+ }
+
+ public static Object getMultipleNestedFieldVals(GenericRecord record, String
fieldMappings, boolean consistentLogicalTimestampEnabled) {
+ StringBuilder sb = new StringBuilder();
+ for (String fieldMapping: fieldMappings.split(";")) {
+ sb.append(fieldMapping).append("=");
Review Comment:
Usually we use comma `,` as the separator for top level split.
--
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]