szehon-ho commented on code in PR #5864:
URL: https://github.com/apache/iceberg/pull/5864#discussion_r981520111
##########
core/src/main/java/org/apache/iceberg/hadoop/HadoopInputFile.java:
##########
@@ -224,9 +224,13 @@ public String location() {
@Override
public boolean exists() {
try {
- return fs.exists(path);
- } catch (IOException e) {
- throw new RuntimeIOException(e, "Failed to check existence for file:
%s", path);
+ return lazyStat() != null;
+ } catch (RuntimeIOException re) {
+ if (re.getCause() instanceof FileNotFoundException) {
Review Comment:
Question, what do you think, about making lazyStat() catch
FileNotFoundException specifically and throwing Iceberg's NotFoundException in
that case? Then here we can catch directly NotFoundException?
--
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]