davintjong-db commented on code in PR #48483:
URL: https://github.com/apache/spark/pull/48483#discussion_r1805128526


##########
core/src/main/scala/org/apache/spark/rdd/NewHadoopRDD.scala:
##########
@@ -244,7 +244,13 @@ class NewHadoopRDD[K, V](
         try {
           val _reader = format.createRecordReader(
             split.serializableHadoopSplit.value, hadoopAttemptContext)
-          _reader.initialize(split.serializableHadoopSplit.value, 
hadoopAttemptContext)
+          try {

Review Comment:
   I don't think that has the right semantics: we only want to close on error, 
whereas I think `tryWithResource` will close at the end of the try block no 
matter what.
   
   Maybe I can add another util to clean this up?



-- 
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]

Reply via email to