rahil-c commented on PR #7914:
URL: https://github.com/apache/iceberg/pull/7914#issuecomment-2212775830
@RussellSpitzer @amogh-jahagirdar Wanted to understand what is the actual
test needed for this change? I saw this comment
```
We also need a test which exercises this code path, (Does HadoopFS do this
by default? If So do we have a test for the other path:noprefix)
```
However based on the diff of the pr the actual logic change is on the list
with prefix path.
When checking `TestRemoveOrphanFilesAction` which uses
`DeleteOrphanFilesSparkAction` my assumption is it would test list prefix as
this test is using `HadoopTables` which use the `HadoopFileIO` which leverages
the `SupportPrefixOperations` interface.
```
@Override
public Iterable<FileInfo> listPrefix(String prefix) {
Path prefixToList = new Path(prefix);
FileSystem fs = Util.getFs(prefixToList, hadoopConf.get());
return () -> {
try {
return Streams.stream(
new AdaptingIterator<>(fs.listFiles(prefixToList, true /*
recursive */)))
.map(
fileStatus ->
new FileInfo(
fileStatus.getPath().toString(),
fileStatus.getLen(),
fileStatus.getModificationTime()))
.iterator();
} catch (IOException e) {
throw new UncheckedIOException(e);
}
};
}
```
--
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]