You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/09/27 17:56:44 UTC
[GitHub] [iceberg] singhpk234 commented on a diff in pull request #5864: Core: Avoid extra getFileStatus call in HadoopInputFile
singhpk234 commented on code in PR #5864:
URL: https://github.com/apache/iceberg/pull/5864#discussion_r981553246
##########
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:
I think it makes sense :) , made the corresponding changes !
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org