felixYyu commented on a change in pull request #4439:
URL: https://github.com/apache/iceberg/pull/4439#discussion_r840139878



##########
File path: mr/src/test/java/org/apache/iceberg/mr/TestIcebergInputFormats.java
##########
@@ -337,7 +339,7 @@ public void testLocality() throws Exception {
     helper.appendToTable(null, expectedRecords);
 
     for (InputSplit split : 
testInputFormat.create(builder.conf()).getSplits()) {
-      Assert.assertArrayEquals(IcebergSplit.ANYWHERE, split.getLocations());
+      Assert.assertArrayEquals(ANYWHERE, split.getLocations());

Review comment:
       because the IcebergSplit check warning log, so make public 'ANYWHERE' 
var to private. the TestIcebergInputFormats need define a private internal 
variable.
   
   ```
   mr\src\main\java\org\apache\iceberg\mr\mapreduce\IcebergSplit.java:38: 
[MutablePublicArray] Non-empty arrays are mutable, so this `public static 
final` array is not a constant and can be modified by clients of this class.  
Prefer an ImmutableList, or provide an accessor method that returns a defensive 
copy.
     public static final String[] ANYWHERE = new String[]{"*"};
                                  ^
       (see https://errorprone.info/bugpattern/MutablePublicArray)
   ```




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