the-other-tim-brown commented on code in PR #12829:
URL: https://github.com/apache/hudi/pull/12829#discussion_r1956578360
##########
hudi-common/src/main/java/org/apache/hudi/common/table/timeline/MetadataConversionUtils.java:
##########
@@ -369,6 +369,14 @@ public static <T extends SpecificRecordBase> T
convertCommitMetadata(HoodieCommi
return (T) avroMetaData;
}
+ /**
+ * Convert commit metadata from json to avro.
+ */
+ public static HoodieCommitMetadata
convertCommitMetadataAvroToPojo(org.apache.hudi.avro.model.HoodieCommitMetadata
hoodieCommitMetadata) {
+ hoodieCommitMetadata.getPartitionToWriteStats().remove(null);
Review Comment:
@danny0405 the [old
code](https://github.com/apache/hudi/blob/master/hudi-common/src/main/java/org/apache/hudi/common/model/HoodieCommitMetadata.java#L229)
has this same removal when converting to json but I am suspicious if it is
really required.
While it is valid to have a `null` key in the hash map in java, I think that
would cause issues at runtime in Hudi, right?
We have an empty string for tables without a partition and then there is a
`__HIVE_DEFAULT_PARTITION__` when the partition value is not extracted.
If we agree this is not needed even in the old path, then we can simplify
this change.
--
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]