arouel commented on code in PR #3500:
URL: https://github.com/apache/parquet-java/pull/3500#discussion_r3107311497


##########
parquet-column/src/main/java/org/apache/parquet/io/api/Binary.java:
##########
@@ -101,6 +113,18 @@ public boolean equals(Object obj) {
     return false;
   }
 
+  /**
+   * Caches {@code hashCode} for non-reused instances and returns it. The 
cache uses
+   * a single int field with sentinel {@code 0} to remain race-safe without 
volatile.
+   * If the computed hash is {@code 0}, no caching occurs and the next call 
recomputes.
+   */
+  final int cacheHashCode(int hashCode) {

Review Comment:
   Ah, that was an oversight by me. Sorry



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