wgtmac commented on code in PR #3700:
URL: https://github.com/apache/parquet-java/pull/3700#discussion_r3701073944


##########
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/metadata/FileMetaData.java:
##########
@@ -42,6 +44,8 @@ public enum EncryptionType {
   private final MessageType schema;
   private final Map<String, String> keyValueMetaData;
   private final String createdBy;
+  private transient volatile ParsedVersion writerVersion;
+  private transient volatile boolean writerVersionParsed;

Review Comment:
   Please replace `writerVersion` and `writerVersionParsed` with one private 
immutable `WriterVersionResult` field. Use a null field only for “not 
initialized”. The result should represent valid, missing, or invalid and retain 
the original parse exception. Initialize it once in a synchronized block. Keep 
only `getWriterVersion()` public: return the parsed version, return null for 
missing `createdBy`, and rethrow the cached exception for invalid `createdBy` 
so callers can preserve the existing fallback without reparsing.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to