voonhous commented on code in PR #18997:
URL: https://github.com/apache/hudi/pull/18997#discussion_r3408889402
##########
hudi-common/src/main/java/org/apache/hudi/metadata/MetadataPartitionType.java:
##########
@@ -427,11 +429,15 @@ public static boolean
shouldDeletePartitionOnRestore(String partitionPath) {
&& partitionType != COLUMN_STATS;
}
+ // Cache values() once; it clones the constant array on every call, and
get(int) runs once per
+ // record materialized from the metadata table (RLI/SI/col-stats lookups,
MDT log merges).
+ private static final MetadataPartitionType[] ENUM_VALUES = values();
Review Comment:
Addressed NIT.
--
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]