LuciferYang commented on code in PR #46935:
URL: https://github.com/apache/spark/pull/46935#discussion_r1636381792


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/xml/XmlInputFormat.scala:
##########
@@ -117,7 +117,10 @@ private[xml] class XmlRecordReader extends 
RecordReader[LongWritable, Text] {
       }
     } else {
       fsin.seek(start)
-      countingIn = new CountingInputStream(fsin)
+      countingIn = BoundedInputStream.builder()
+        .setInputStream(fsin)
+        .setMaxCount(fileSplit.getLength)

Review Comment:
   Is this really necessary in the current scenario? Perhaps the `unbound` one 
is enough?



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