thswlsqls commented on code in PR #18036:
URL: https://github.com/apache/iceberg/pull/18036#discussion_r4488935189
##########
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, agreed — I've moved it into its own test.
`testLocalityIsKeptAcrossCalls` calls `getLocations()` twice on a
locality-preferred split. It fails on `main` (the second call returns `*`) and
passes with the fix, and `testLocality` is back to its original assertions.
Done in 63aff85ee2.
--
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]