thswlsqls commented on code in PR #18036:
URL: https://github.com/apache/iceberg/pull/18036#discussion_r4475209823


##########
mr/src/test/java/org/apache/iceberg/mr/TestIcebergInputFormats.java:
##########
@@ -326,6 +326,8 @@ public void testLocality() throws Exception {
 
     for (InputSplit split : 
testInputFormat.create(builder.conf()).getSplits()) {
       assertThat(split.getLocations()).containsExactly("localhost");
+      // repeated calls must return the same locations that were computed and 
cached above
+      assertThat(split.getLocations()).containsExactly("localhost");

Review Comment:
   @pvary Thanks for the review — the line added here is that test: it fails on 
`main` and passes with the fix.
   
   Before the fix, the second `getLocations()` call hits the `else` branch and 
returns `["*"]`, so all 6 parameterized variants of `testLocality` fail on this 
line. With the fix, both calls return `localhost`.
   
   Happy to move it into its own test method if you'd prefer it separate.
   



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