linliu-code commented on code in PR #12122:
URL: https://github.com/apache/hudi/pull/12122#discussion_r1819804569
##########
hudi-common/src/main/java/org/apache/hudi/common/model/HoodieRecord.java:
##########
@@ -427,6 +428,24 @@ public HoodieRecord rewriteRecordWithNewSchema(Schema
recordSchema, Properties p
public abstract Option<Map<String, String>> getMetadata();
+ private void initMetadata() {
+ this.metaData = Option.of(new HashMap<>());
+ }
+
+ public void addMetadata(String key, String value) {
+ if (metaData == null || metaData.isEmpty()) {
+ initMetadata();
+ }
Review Comment:
So, should we initialize or not?
--
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]