the-other-tim-brown commented on code in PR #17952:
URL: https://github.com/apache/hudi/pull/17952#discussion_r2741948232
##########
hudi-common/src/main/java/org/apache/hudi/common/schema/HoodieSchema.java:
##########
@@ -546,10 +559,10 @@ public List<HoodieSchemaField> getFields() {
if (type != HoodieSchemaType.RECORD) {
throw new IllegalStateException("Cannot get fields from non-record
schema: " + type);
}
-
- return avroSchema.getFields().stream()
- .map(HoodieSchemaField::new)
- .collect(Collectors.toList());
+ if (fields == null) {
+ fields =
avroSchema.getFields().stream().map(HoodieSchemaField::new).collect(Collectors.toList());
Review Comment:
Makes sense, I'll add it.
--
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]