danny0405 commented on a change in pull request #5141:
URL: https://github.com/apache/hudi/pull/5141#discussion_r836027994
##########
File path:
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/hudi/HoodieBaseRelation.scala
##########
@@ -333,7 +335,13 @@ object HoodieBaseRelation {
partitionedFile => {
val extension = FSUtils.getFileExtension(partitionedFile.filePath)
if (HoodieFileFormat.PARQUET.getFileExtension.equals(extension)) {
- parquetReader.apply(partitionedFile)
+ val iter = parquetReader.apply(partitionedFile)
+ if (iter.isInstanceOf[Closeable]) {
+ // register a callback to close parquetReader which will be executed
on task completion.
Review comment:
Did you mean `AutoClosable` ?
--
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]