KnightChess commented on code in PR #11747:
URL: https://github.com/apache/hudi/pull/11747#discussion_r1711340468
##########
hudi-common/src/main/java/org/apache/hudi/avro/HoodieAvroUtils.java:
##########
@@ -1017,9 +1017,19 @@ private static Object
rewriteRecordWithNewSchemaInternal(Object oldRecord, Schem
public static String createFullName(Deque<String> fieldNames) {
String result = "";
if (!fieldNames.isEmpty()) {
- List<String> parentNames = new ArrayList<>();
- fieldNames.descendingIterator().forEachRemaining(parentNames::add);
- result = parentNames.stream().collect(Collectors.joining("."));
+ Iterator<String> iter = fieldNames.descendingIterator();
+ result = iter.next();
+ if (!iter.hasNext()) {
+ return result;
+ }
+
+ StringBuilder sb = new StringBuilder();
+ sb.append(result);
+ while (iter.hasNext()) {
+ sb.append(".");
+ sb.append(iter.next());
+ }
+ result = sb.toString();
Review Comment:
@wombatu-kun oh, my mistack, got it. And found rewrite record trigger it,
thanks.
--
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]