gengliangwang commented on a change in pull request #24483: [SPARK-27588] 
Binary file data source fails fast and doesn't attempt to read very large files
URL: https://github.com/apache/spark/pull/24483#discussion_r279513173
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/binaryfile/BinaryFileFormat.scala
 ##########
 @@ -115,6 +118,11 @@ class BinaryFileFormat extends FileFormat with 
DataSourceRegister {
             case (MODIFICATION_TIME, i) =>
               writer.write(i, 
DateTimeUtils.fromMillis(status.getModificationTime))
             case (CONTENT, i) =>
+              if (status.getLen > maxLength) {
 
 Review comment:
   I think we can move this to line 113.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to