diff --git a/java/tools/src/java/org/apache/orc/tools/convert/ConvertTool.java b/java/tools/src/java/org/apache/orc/tools/convert/ConvertTool.java index 585a43fe6a..fbdb8696de 100644 --- a/java/tools/src/java/org/apache/orc/tools/convert/ConvertTool.java +++ b/java/tools/src/java/org/apache/orc/tools/convert/ConvertTool.java @@ -79,6 +79,7 @@ TypeDescription buildSchema(List files, Reader reader = OrcFile.createReader(file.path, OrcFile.readerOptions(conf) .filesystem(file.filesystem)); + reader.close(); if (files.size() == 1) { return reader.getSchema(); }