deniskuzZ commented on code in PR #9301:
URL: https://github.com/apache/iceberg/pull/9301#discussion_r1427131740


##########
orc/src/main/java/org/apache/iceberg/orc/OrcIterable.java:
##########
@@ -134,7 +134,13 @@ private static VectorizedRowBatchIterator newOrcIterator(
 
     try {
       return new VectorizedRowBatchIterator(
-          file.location(), readerSchema, orcFileReader.rows(options), 
recordsPerBatch);
+          file.location(), readerSchema, orcFileReader.rows(options), 
recordsPerBatch) {
+        @Override
+        public void close() throws IOException {

Review Comment:
   > Thanks for the explanation. So basically the `addCloseable(reader);` is 
not used here, neither in `ParquetIterable`, as the returned 
`CloseableIterator` `close` method is used clean up the resources. And in case 
of the Vectorized ORC reads, we return not the `OrcRowIterator` which closes 
the reader, but the `VectorizedRowBatchIterator` which closes the `RecordReader 
rows` which is generated like this: `orcFileReader.rows(options)`. And the 
`RecordReaderImpl` generated this way does not close the underlying 
`ReaderImpl`.
   > 
   > Am I right here? Could we eventually fix this in ORC too? If so, it would 
be nice to have a ORC jira saying that this could be removed once it is fixed 
in ORC...
   
   Yes, see [HIVE-25736](https://issues.apache.org/jira/browse/HIVE-25736) :)
   



-- 
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-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to