mengxr 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_r279521991
##########
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 don't get it. The conf is to prevent reading very large files that we are
sure about failures. User can still use the data source if they don't need
`content`.
----------------------------------------------------------------
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]