the-other-tim-brown commented on code in PR #13411:
URL: https://github.com/apache/hudi/pull/13411#discussion_r2145334842
##########
hudi-common/src/main/java/org/apache/hudi/avro/AvroSchemaCache.java:
##########
@@ -33,7 +35,12 @@ public class AvroSchemaCache {
// Ensure that there is only one variable instance of the same schema within
an entire JVM lifetime
- private static final LoadingCache<Schema, Schema> SCHEMA_CACHE =
Caffeine.newBuilder().weakValues().maximumSize(1024).build(k -> k);
+ private static final LoadingCache<Schema, Schema> SCHEMA_CACHE =
Caffeine.newBuilder().weakValues().maximumSize(1024).build(inputSchema -> {
+ if (inputSchema.equals(HoodieMetadataRecord.getClassSchema())) {
Review Comment:
Yes, it's just an optimization so if they are equivalent they will not need
to perform the rest of the equals. If we need it we can do something similar
for registering initial versions of our predefined schemas in a separate 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]