rdblue commented on a change in pull request #2829:
URL: https://github.com/apache/iceberg/pull/2829#discussion_r705565428



##########
File path: 
spark/src/main/java/org/apache/iceberg/spark/actions/BaseRewriteDataFilesSparkAction.java
##########
@@ -383,4 +408,31 @@ public int totalGroupCount() {
       return totalGroupCount;
     }
   }
+
+  static class EmptyStruct implements StructLike {
+
+    private static EmptyStruct instance;
+
+    static EmptyStruct instance() {

Review comment:
       For most singletons, we use `public static EmptyStruct get()` and do the 
initialization at class init time to avoid a race condition:
   
   ```java
     private static final EmptyStruct INSTANCE = new EmptyStruct();
     static EmptyStruct get() {
       return INSTANCE;
     }
   ```




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