LuciferYang commented on a change in pull request #35622:
URL: https://github.com/apache/spark/pull/35622#discussion_r813016663
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/package.scala
##########
@@ -100,6 +70,23 @@ package object util extends Logging {
file
}
+ private def toByteArray(inStream: InputStream): Array[Byte] = {
+ val outStream = new ByteArrayOutputStream
+ try {
+ var reading = true
+ while (reading) {
+ inStream.read() match {
Review comment:
It has been changed to call `ByteStreams.toByteArray`, but do we still
need to extract a private method? It seems that there are not many duplicate
codes
--
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]